String contentKey = NetworkTestUtil.randomString();
// create a message with target node B
TestDirectMessageWithReply message = new TestDirectMessageWithReply(nodeB.getConnection().getPeer()
.getPeerAddress(), contentKey);
// create and add a callback handler
TestCallBackHandler callBackHandler = message.new TestCallBackHandler(nodeA);
message.setCallBackHandler(callBackHandler);
// send message
assertTrue(nodeA.getMessageManager().sendDirect(message, getPublicKey(nodeB)));