class Call {

    @Override
    public boolean equals(final Object o) {
        return
            o instanceof Call && commandName.equals(((Call) o).commandName);
    }

}

class CallTest {

    @Test
    public void testEquals() throws Exception {

        final Call call = call("cmd");
        assertTrue(call.equals(call("cmd")));
    }

}