@Test(timeout = 30_000)
public void testResolver() {

    Iterator<MasterInstance> it = resolver.observeLocalMasterInstanceUpdates().toIterable().iterator();
    readinessUpdatesProcessor.onNext(newReadinessStatus(ReadinessState.NotReady));
    assertThat(it.next().getStatus().getState()).isEqualTo(MasterState.Starting);
    readinessUpdatesProcessor.onNext(newReadinessStatus(ReadinessState.Enabled));
    assertThat(it.next().getStatus().getState()).isEqualTo(MasterState.NonLeader);
}