assertEquals(future.get(1, TimeUnit.SECONDS), echoMessage);
}
@Test
public void testCallFutureDisconnected() throws Exception {
EchoMessage echoMessage = EchoMessage.newBuilder()
.setMessage(MESSAGE).build();
CallFuture<EchoMessage> future = new CallFuture<EchoMessage>();
server.shutdown();
server = null;
stub.echo(future.getController(), echoMessage, future);
EchoMessage response = future.get();
assertNull(response);
assertTrue(future.getController().failed());
assertTrue(future.getController().errorText() != null);
}