@Test public void testEmptyMessage() throws IOException { Message msgInput = messageFactory.createMessage(""); ByteBuffer rxBuffer = ByteBuffer.allocateDirect(8192); msgInput.encode(rxBuffer); rxBuffer.flip(); Message messageOutpu = messageFactory.createMessage(rxBuffer); assertEquals(messageOutpu, msgInput); }
public Message createMessage(String message) { return new Message(message.getBytes()); }
MessageFactory { public Message createMessage(String message) { return new Message(message.getBytes()); } }
MessageFactory { public Message createMessage(String message) { return new Message(message.getBytes()); } protected  MessageFactory(); }
MessageFactory { public Message createMessage(String message) { return new Message(message.getBytes()); } protected  MessageFactory(); Message createMessage(String message); Message createMessage(ByteBuffer buffer); }
MessageFactory { public Message createMessage(String message) { return new Message(message.getBytes()); } protected  MessageFactory(); Message createMessage(String message); Message createMessage(ByteBuffer buffer); static final int MESSAGE_HEADER_SIZE; }