@Test(expected = RuntimeException.class)
public void shouldNotFindServerGivenAnUnsuccessfulResponse() throws Exception {

  final ServerProtocol mockServerProtocol = getMockServerProtocol();
  final ServerEntity mockServerEntity = getMockServerEntity();
  CommandMessage mockCommandMessage = mock(CommandMessage.class);
  when(mockProtocolMessageComposer.composeGetServerInfoCommand()).thenReturn(mockCommandMessage);
  when(mockMessageJsonMapper.transformMessage(mockCommandMessage)).thenReturn("whatever");
  Message mockMessage = mock(Message.class);
  when(mockMessage.isSuccess()).thenReturn(false);
  when(mockMessage.isServer()).thenReturn(true);
  when(mockMessage.getServer()).thenReturn(mockServerProtocol);
  when(mockMessageJsonMapper.transformMessage(anyString())).thenReturn(mockMessage);
  when(mockServerMessageValidator.isValid(mockMessage)).thenReturn(true);
  when(mockServerMessageValidator.cast(mockMessage)).thenReturn(mockServerProtocol);
  when(mockServerProtocolMapper.transform(mockServerProtocol)).thenReturn(mockServerEntity);
  Observable<ServerEntity> serverEntityObservable = serverSearchManager.searchServer();
  ServerEntity serverEntity = serverEntityObservable.blockingFirst();
}