@Test
public void addDuringTraversing() {

    final TestObserver observer3 = mock(TestObserver.class);
    final TestObserver observer1 = spy(new TestObserver() {
        @Override
        public void onStart() {
            mRegistry.addObserver(observer3);
        }
    });
    final TestObserver observer2 = mock(TestObserver.class);
    mRegistry.addObserver(observer1);
    mRegistry.addObserver(observer2);
    dispatchEvent(ON_CREATE);
    dispatchEvent(ON_START);
    InOrder inOrder = inOrder(observer1, observer2, observer3);
    inOrder.verify(observer1).onCreate();
    inOrder.verify(observer2).onCreate();
    inOrder.verify(observer1).onStart();
    inOrder.verify(observer3).onCreate();
    inOrder.verify(observer2).onStart();
    inOrder.verify(observer3).onStart();
}