@Test
public void testSend() throws Exception {

    input.substitute("send 127.0.0.1 8080\ntoWhom\nThis is a message\nEOM\nexit\n");
    //---------------------------------------------------------------------^ For the no-reply prompt
    RequestPacket requestPacket = RequestPacket.newMessage((PrivateKey) randomKey(), ((PrivateKey)randomKey()).toPublicKey(), "toWhom", name);
    requestPacket.setCommunications(communications);
    requestPacket.setMessage("This is the response");
    communications.sendMessage("127.0.0.1", "8080", "This is a message\n", "toWhom");
    replay(communications);
    console.run();
    doMatch(outputStream, "client> Enter the name of the receiver \\(max 62 bytes\\): Enter a message \\(max 4096 bytes\\) followed by EOM on a blank line:\n" +
            "client> ");
    verify(communications);
}