public void run(SudokuResponse response) {
// System.out.println(parameter);
gotResponse = response;
}
});
RpcMessage message = (RpcMessage) mockChannel.message;
assertEquals(1, message.getId());
assertEquals(MessageType.REQUEST, message.getType());
assertEquals(remoteService.getDescriptorForType().getFullName(), message.getService());
assertEquals("Solve", message.getMethod());
SudokuResponse sudokuResponse = SudokuResponse.newBuilder()
.setSolved(true)
.setCheckerboard("123456")
.build();
RpcMessage response = RpcMessage.newBuilder()
.setType(MessageType.RESPONSE)
.setId(1)
.setResponse(sudokuResponse.toByteString())
.build();
channel.messageReceived(null, new UpstreamMessageEvent(mockChannel, response, null));