@Test
public void shouldNotBuildReactiveStreamForInvalidNetworkAddress() throws Exception {

  NetworkAddress networkAddress = NetworkAddress.builder()
      .ip("")
      .port(-1)
      .build();
  SearchServerInteractor.Params params =
      SearchServerInteractor.Params.forNetworkAddress(networkAddress);
  when(mockNetworkAddressValidator.isValid(networkAddress)).thenReturn(false);
  Observable<Server> serverObservable = searchServerInteractor.buildReactiveStream(params);
  TestObserver<Server> testObserver = serverObservable.test();
  testObserver.assertErrorMessage("Invalid IP Address");
  verifyZeroInteractions(searchServerService);
}