Call { @Override public boolean equals(final Object o) { return o instanceof Call && commandName.equals(((Call) o).commandName); } Call(final String commandName, final Completer... completers); static Call call(final String commandName, final Completer... completers); String commandName(); Completer[] completers(); @Override boolean equals(final Object o); @Override int hashCode();  }
@Test public void testEquals() throws Exception { final Call call = call("cmd"); assertTrue(call.equals(call("cmd"))); }