@Test
public void testMultipleSources() {

    Observer observer1 = mock(Observer.class);
    mMediator.addSource(mSource, observer1);
    MutableLiveData<Integer> source2 = new MutableLiveData<>();
    Observer observer2 = mock(Observer.class);
    mMediator.addSource(source2, observer2);
    mSource.setValue("flatfoot");
    verify(observer1).onChanged("flatfoot");
    verify(observer2, never()).onChanged(any());
    reset(observer1, observer2);
    source2.setValue(1703);
    verify(observer1, never()).onChanged(any());
    verify(observer2).onChanged(1703);
    reset(observer1, observer2);
    mRegistry.handleLifecycleEvent(Lifecycle.Event.ON_STOP);
    mSource.setValue("failure");
    source2.setValue(0);
    verify(observer1, never()).onChanged(any());
    verify(observer2, never()).onChanged(any());
}