SSL2ClientHelloMessage extends SSL2HandshakeMessage { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("SSL2ClientHelloMessage:"); sb.append("\n Protocol Version: "); if (getProtocolVersion() != null && getProtocolVersion().getValue() != null) { sb.append(ProtocolVersion.getProtocolVersion(getProtocolVersion().getValue())); } else { sb.append("null"); } sb.append("\n Type: "); if (getType() != null && getType().getValue() != null) { sb.append(getType().getValue()); } else { sb.append("null"); } sb.append("\n Supported CipherSuites: "); if (getCipherSuites() != null && getCipherSuites().getValue() != null) { sb.append(ArrayConverter.bytesToHexString(getCipherSuites().getValue())); } else { sb.append("null"); } sb.append("\n Challange: "); if (getChallenge() != null && getChallenge().getValue() != null) { sb.append(ArrayConverter.bytesToHexString(getChallenge().getValue())); } else { sb.append("null"); } sb.append("\n SessionID: "); if (getSessionId() != null && getSessionId().getValue() != null) { sb.append(ArrayConverter.bytesToHexString(getSessionId().getValue())); } else { sb.append("null"); } return sb.toString(); } SSL2ClientHelloMessage();  SSL2ClientHelloMessage(Config config); @Override String toCompactString(); ModifiableByteArray getProtocolVersion(); void setProtocolVersion(ModifiableByteArray protocolVersion); void setProtocolVersion(byte[] protocolVersion); ModifiableInteger getCipherSuiteLength(); void setCipherSuiteLength(ModifiableInteger cipherSuiteLength); void setCipherSuiteLength(int cipherSuiteLength); ModifiableByteArray getCipherSuites(); void setCipherSuites(ModifiableByteArray cipherSuites); void setCipherSuites(byte[] cipherSuites); ModifiableByteArray getChallenge(); void setChallenge(ModifiableByteArray challenge); void setChallenge(byte[] challenge); ModifiableInteger getSessionIdLength(); void setSessionIdLength(ModifiableInteger sessionIdLength); void setSessionIDLength(int sessionIDLength); ModifiableInteger getChallengeLength(); void setChallengeLength(int challengeLength); void setChallengeLength(ModifiableInteger challengeLength); ModifiableByteArray getSessionId(); void setSessionId(ModifiableByteArray sessionId); void setSessionID(byte[] sessionID); @Override String toString(); @Override SSL2ClientHelloHandler getHandler(TlsContext context);  }
@Test public void testToString() { StringBuilder sb = new StringBuilder(); sb.append("SSL2ClientHelloMessage:"); sb.append("\n Protocol Version: ").append("null"); sb.append("\n Type: ").append("null"); sb.append("\n Supported CipherSuites: ").append("null"); sb.append("\n Challange: ").append("null"); sb.append("\n SessionID: ").append("null"); assertEquals(message.toString(), sb.toString()); }