@Test
public void shouldReturnValidServer() throws Exception {

  ServerEntity serverEntity = getServerEntity();
  Server server = getServer();
  Observable<ServerEntity> observable = Observable.create(subscriber -> {
    subscriber.onNext(serverEntity);
    subscriber.onComplete();
  });
  when(mockServerSearchManager.searchServer()).thenReturn(observable);
  when(mockServerEntityDataMapper.transform(serverEntity)).thenReturn(server);
  Observable<Server> serverObservable = networkActionProvider.searchServer();
  TestObserver<Server> testObserver = serverObservable.test();
  testObserver.assertNoErrors();
  testObserver.assertComplete();
  testObserver.assertResult(server);
  verify(mockServerSearchManager, times(1)).searchServer();
  verify(mockServerEntityDataMapper, times(1)).transform(serverEntity);
  verifyNoMoreInteractions(mockServerSearchManager, mockServerEntityDataMapper);
}