### Question:
BodyConfig { @Override public boolean equals(Object object) { if (this == object) { return true; } if (object == null || object.getClass() != getClass()) { return false; } final BodyConfig other = (BodyConfig) object; return Double.compare(getGravity(), other.getGravity()) == 0 && Double.compare(getGravityMax(), other.getGravityMax()) == 0; } BodyConfig(double gravity, double gravityMax); static BodyConfig imports(Configurer configurer); static void exports(Xml root, Body body); double getGravity(); double getGravityMax(); @Override int hashCode(); @Override boolean equals(Object object); @Override String toString(); static final String NODE_BODY; static final String ATT_GRAVITY; static final String ATT_GRAVITY_MAX; }### Answer:
@Test void testEquals() { final BodyConfig config = new BodyConfig(1.0, 2.0); assertEquals(config, config); assertEquals(config, new BodyConfig(1.0, 2.0)); assertNotEquals(config, null); assertNotEquals(config, new Object()); assertNotEquals(config, new BodyConfig(2.0, 2.0)); assertNotEquals(config, new BodyConfig(1.0, 1.0)); }