@Test
public void eachEvent() {

    AllMethodsListener obj = mock(AllMethodsListener.class);
    ReflectiveGenericLifecycleObserver observer = new ReflectiveGenericLifecycleObserver(obj);
    when(mLifecycle.getCurrentState()).thenReturn(CREATED);
    observer.onStateChanged(mOwner, ON_CREATE);
    verify(obj).created();
    reset(obj);
    when(mLifecycle.getCurrentState()).thenReturn(STARTED);
    observer.onStateChanged(mOwner, ON_START);
    verify(obj).started();
    reset(obj);
    when(mLifecycle.getCurrentState()).thenReturn(RESUMED);
    observer.onStateChanged(mOwner, ON_RESUME);
    verify(obj).resumed();
    reset(obj);
    when(mLifecycle.getCurrentState()).thenReturn(STARTED);
    observer.onStateChanged(mOwner, ON_PAUSE);
    verify(obj).paused();
    reset(obj);
    when(mLifecycle.getCurrentState()).thenReturn(CREATED);
    observer.onStateChanged(mOwner, ON_STOP);
    verify(obj).stopped();
    reset(obj);
    when(mLifecycle.getCurrentState()).thenReturn(INITIALIZED);
    observer.onStateChanged(mOwner, ON_DESTROY);
    verify(obj).destroyed();
    reset(obj);
}