@Test
public void shouldTestGetRegisteredEventListenersTest_testRemoveEventListener() throws Exception {

    SimpleListener listener1 = addListener(0, ALL_EVENTS, null, false, null, null, false);
    EventListener listener2 = addListener(0, ALL_EVENTS, null, false, null, null, false);
    assertThat("Wrong number of event listeners.", getObservationManager().getRegisteredEventListeners().getSize(), is(2L));
    // now remove
    removeListener(listener1);
    assertThat("Wrong number of event listeners after removing a listener.",
               getObservationManager().getRegisteredEventListeners().getSize(),
               is(1L));
    assertThat("Wrong number of event listeners after removing a listener.",
               getObservationManager().getRegisteredEventListeners().nextEventListener(),
               is(listener2));
}