UnknownMessage extends ProtocolMessage { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("UnknownMessage:"); sb.append("\n Data: "); if (getCompleteResultingMessage() != null && getCompleteResultingMessage().getValue() != null) { sb.append(ArrayConverter.bytesToHexString(getCompleteResultingMessage().getValue())); } else { sb.append("null"); } return sb.toString(); } UnknownMessage();  UnknownMessage(Config config); byte[] getDataConfig(); void setDataConfig(byte[] dataConfig); @Override String toCompactString(); @Override ProtocolMessageHandler getHandler(TlsContext context); @Override String toString();  }
@Test public void testToString() { StringBuilder sb = new StringBuilder(); sb.append("UnknownMessage:"); sb.append("\n Data: ").append("null"); assertEquals(message.toString(), sb.toString()); }