@Test(expected = IllegalArgumentException.class)
public void shouldTrackEventHandlersByIdentityNotEquality()
throws Exception
{
EvilEqualsEventHandler handler1 = new EvilEqualsEventHandler();
EvilEqualsEventHandler handler2 = new EvilEqualsEventHandler();
disruptor.handleEventsWith(handler1);
// handler2.equals(handler1) but it hasn't yet been registered so should throw exception.
disruptor.after(handler2);