EncryptedExtensionsMessage extends HandshakeMessage { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("EncryptedExtensionMessage:"); sb.append("\n Extensions: "); if (getExtensions() == null) { sb.append("null"); } else { for (ExtensionMessage e : getExtensions()) { sb.append(e.toString()); } } return sb.toString(); } EncryptedExtensionsMessage();  EncryptedExtensionsMessage(Config config); @Override String toString(); @Override EncryptedExtensionsHandler getHandler(TlsContext context);  }
@Test public void testToString() { StringBuilder sb = new StringBuilder(); sb.append("EncryptedExtensionMessage:"); sb.append("\n Extensions: ").append("null"); assertEquals(message.toString(), sb.toString()); }