@Test
public void testSourceInactive() {

    Observer observer = mock(Observer.class);
    mMediator.addSource(mSource, observer);
    assertThat(mSourceActive, is(true));
    mRegistry.handleLifecycleEvent(Lifecycle.Event.ON_STOP);
    assertThat(mSourceActive, is(false));
    mRegistry.handleLifecycleEvent(Lifecycle.Event.ON_START);
    assertThat(mSourceActive, is(true));
}