RouteConfigurationImpl implements RouteConfiguration { @Override public int hashCode() { return (new HashCodeBuilder()) .append(getNlri()) .append(getPathAttributes()) .toHashCode(); } 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 testHashCode() { 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.hashCode() == b.hashCode()); }