NATSituation { @Override public boolean equals(final Object obj) { if (null == obj) { return false; } if (!(obj instanceof NATSituation)) { return false; } final NATSituation other = (NATSituation) obj; final NATFeatureRealization thisClientMapping = this.clientNat.getFeatureRealization(NATFeature.MAPPING); final NATFeatureRealization thisClientFiltering = this.clientNat.getFeatureRealization(NATFeature.FILTERING); final NATFeatureRealization thisServiceMapping = this.serviceNat.getFeatureRealization(NATFeature.MAPPING); final NATFeatureRealization thisServiceFiltering = this.serviceNat.getFeatureRealization(NATFeature.FILTERING); final NATFeatureRealization otherClientMapping = other.getClientNATBehavior().getFeatureRealization( NATFeature.MAPPING); final NATFeatureRealization otherClientFiltering = other.getClientNATBehavior().getFeatureRealization( NATFeature.FILTERING); final NATFeatureRealization otherServiceMapping = other.getServiceNATBehavior().getFeatureRealization( NATFeature.MAPPING); final NATFeatureRealization otherServiceFiltering = other.getServiceNATBehavior().getFeatureRealization( NATFeature.FILTERING); if (thisClientMapping.equals(otherClientMapping) && thisClientFiltering.equals(otherClientFiltering) && thisServiceMapping.equals(otherServiceMapping) && thisServiceFiltering.equals(otherServiceFiltering)) { return true; } return false; } NATSituation();  NATSituation(final NATBehavior clientNat, final NATBehavior serviceNat);  NATSituation(final NATFeatureRealization clientMapping, final NATFeatureRealization clientFiltering,
            final NATFeatureRealization serviceMapping, final NATFeatureRealization serviceFiltering); NATBehavior getClientNATBehavior(); NATBehavior getServiceNATBehavior(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }
@Test public void testNotEquals() { NATSituation nat1 = new NATSituation(); NATSituation nat2 = new NATSituation(NATFeatureRealization.ADDRESS_AND_PORT_DEPENDENT, NATFeatureRealization.ADDRESS_AND_PORT_DEPENDENT, NATFeatureRealization.ADDRESS_AND_PORT_DEPENDENT, NATFeatureRealization.ADDRESS_AND_PORT_DEPENDENT); assertFalse(nat1.equals(nat2)); }
@Test public void testNotEqualsWithNull() { NATSituation nat = new NATSituation(); assertFalse(nat.equals(null)); }
@Test public void testNotEqualsWithNATBehavior() { NATSituation nat = new NATSituation(); NATBehavior beh = new NATBehavior(); assertFalse(nat.equals(beh)); }