Commit extends Operation { @Override public boolean equals(Object other) { if (this == other) { return true; } if (!(other instanceof Commit)) { return false; } Commit that = (Commit) other; return durable == that.isDurable(); } Commit(boolean durable); boolean isDurable(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString();  }
@Test public void testEquals() { new EqualsTester() .addEqualityGroup(new Commit(false), new Commit(false)) .addEqualityGroup(new Commit(true), new Commit(true)) .testEquals(); }