DefaultPropertySourceSnapshot implements PropertySource, Serializable { @Override public boolean equals(Object o) { if (this == o) { return true; } if (!(o instanceof DefaultPropertySourceSnapshot)) { return false; } DefaultPropertySourceSnapshot that = (DefaultPropertySourceSnapshot) o; return ordinal == that.ordinal && properties.equals(that.properties); } 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 testEquals() throws Exception { PropertySource ps1 = DefaultPropertySourceSnapshot.of(MY_PS); PropertySource ps2 = DefaultPropertySourceSnapshot.of(MY_PS); assertThat(ps1.getName()).isEqualTo(ps2.getName()); assertThat(ps1.getProperties()).hasSize(ps2.getProperties().size()); }