DefaultPropertySourceSnapshot implements PropertySource, Serializable { @Override public int hashCode() { int result = ordinal; result = 31 * result + properties.hashCode(); return result; } DefaultPropertySourceSnapshot(PropertySource propertySource);  DefaultPropertySourceSnapshot(PropertySource propertySource, Iterable<String> keys); static DefaultPropertySourceSnapshot of(PropertySource propertySource); static DefaultPropertySourceSnapshot of(PropertySource propertySource, Iterable<String> keys); Set<String> getKeys(); @Override String getName(); int getOrdinal(); long getFrozenAt(); @Override PropertyValue get(String key); @Override Map<String, PropertyValue> getProperties(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString();  }
@Test public void testHashCode() throws Exception { boolean alwaysDifferent = true; for(int i=0;i<10;i++){ PropertySource ps1 = DefaultPropertySourceSnapshot.of(MY_PS); PropertySource ps2 = DefaultPropertySourceSnapshot.of(MY_PS); if(ps1.hashCode()==ps2.hashCode()){ alwaysDifferent=false; break; } } if(alwaysDifferent){ fail("HashCode should be same if frozenAt is in the same ms..."); } }