@Override
    public boolean equals(Object obj) {
        if (this == obj) {
            return true;
        }
        if (obj instanceof NiciraMatchEncapEthType) {
            NiciraMatchEncapEthType that = (NiciraMatchEncapEthType) obj;
            return Objects.equals(encapEthType, that.encapEthType);

        }
        return false;
    }
@Test
    public void testEquals() {
        final NiciraMatchEncapEthType encapEthType1 = new NiciraMatchEncapEthType(ethType1);
        final NiciraMatchEncapEthType sameAsEncapEthType1 = new NiciraMatchEncapEthType(ethType1);
        final NiciraMatchEncapEthType encapEthType2 = new NiciraMatchEncapEthType(ethType2);

        new EqualsTester().addEqualityGroup(encapEthType1, sameAsEncapEthType1).addEqualityGroup(encapEthType2)
        .testEquals();
    }