### Question:
MessengerChannelServer extends BaseChannelServer { @Override public boolean send(MessageException error) { Bundle b = new Bundle(); b.putString(KEY_DATA_RESPONSE, error.toJson()); Message message = createMessage(b, MESSAGE_ERROR); return send(message); } MessengerChannelServer(String serviceComponentName, String clientPackageName); @Override void handleMessage(Message msg); @Override void disposeClient(); @Override boolean send(MessageException error); @Override String getClientPackageName(); @Override boolean send(String senddata); @Override boolean sendEndStream();  }### Answer:
@Test public void willSendMessage() throws RemoteException { setupReplyTo(); String message = "hellooooooo"; boolean sent = messengerChannelServer.send(message); assertThat(sent).isTrue(); verifySentMessage(MESSAGE_RESPONSE, message); }
@Test public void willSendExceptionMessage() throws RemoteException { setupReplyTo(); MessageException message = new MessageException("bleep", "bloop"); boolean sent = messengerChannelServer.send(message); assertThat(sent).isTrue(); verifySentMessage(MESSAGE_ERROR, message.toJson()); }