RouteConfigurationImpl implements RouteConfiguration { @Override public boolean equals(Object obj) { if(!(obj instanceof RouteConfiguration)) return false; RouteConfiguration o = (RouteConfiguration)obj; return (new EqualsBuilder()) .append(getNlri(), o.getNlri()) .append(getPathAttributes(), o.getPathAttributes()) .isEquals(); } RouteConfigurationImpl();  RouteConfigurationImpl(NetworkLayerReachabilityInformation nlri, PathAttributeConfiguration pathAttributes); @Override int compareTo(RouteConfiguration o); @Override NetworkLayerReachabilityInformation getNlri(); @Override PathAttributeConfiguration getPathAttributes(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void testEquals() { RouteConfiguration a = new RouteConfigurationImpl( new NetworkLayerReachabilityInformation(24, new byte[] { (byte)0xc0, (byte)0xa8, (byte)0x01}), new PathAttributeConfigurationImpl(Arrays.asList((PathAttribute)(new LocalPrefPathAttribute(100))))); RouteConfiguration b = new RouteConfigurationImpl( new NetworkLayerReachabilityInformation(24, new byte[] { (byte)0xc0, (byte)0xa8, (byte)0x01}), new PathAttributeConfigurationImpl(Arrays.asList((PathAttribute)(new LocalPrefPathAttribute(100))))); Assert.assertTrue(a.equals(b)); }