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

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

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