SSL2ServerHelloMessage extends SSL2HandshakeMessage { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("SSL2ServerHelloMessage:"); 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 SessionIdHit: "); if (getSessionIdHit() != null && getSessionIdHit().getValue() != null) { sb.append(getSessionIdHit().getValue()); } else { sb.append("null"); } sb.append("\n Certificate: "); if (getCertificate() != null && getCertificate().getValue() != null) { sb.append(ArrayConverter.bytesToHexString(getCertificate().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(); } SSL2ServerHelloMessage();  SSL2ServerHelloMessage(Config config); @Override String toCompactString(); @Override SSL2ServerHelloHandler getHandler(TlsContext context); ModifiableByte getSessionIdHit(); void setSessionIdHit(ModifiableByte sessionIdHit); void setSessionIdHit(byte sessionIdHit); ModifiableByte getCertificateType(); void setCertificateType(ModifiableByte certificateType); void setCertificateType(byte certificateType); ModifiableByteArray getProtocolVersion(); void setProtocolVersion(ModifiableByteArray protocolVersion); void setProtocolVersion(byte[] protocolVersion); ModifiableInteger getCertificateLength(); void setCertificateLength(int certificateLength); void setCertificateLength(ModifiableInteger certificateLength); ModifiableInteger getCipherSuitesLength(); void setCipherSuitesLength(ModifiableInteger cipherSuitesLength); void setCipherSuitesLength(int cipherSuitesLength); ModifiableInteger getSessionIdLength(); void setSessionIdLength(ModifiableInteger sessionIdLength); void setSessionIDLength(int connectionIDLength); ModifiableByteArray getCertificate(); void setCertificate(ModifiableByteArray certificate); void setCertificate(byte[] certificate); ModifiableByteArray getCipherSuites(); void setCipherSuites(ModifiableByteArray cipherSuites); void setCipherSuites(byte[] cipherSuites); ModifiableByteArray getSessionId(); void setSessionId(ModifiableByteArray sessionId); void setSessionID(byte[] sessionID); @Override String toString();  }
@Test public void testToString() { StringBuilder sb = new StringBuilder(); sb.append("SSL2ServerHelloMessage:"); sb.append("\n Protocol Version: ").append("null"); sb.append("\n Type: ").append("null"); sb.append("\n Supported CipherSuites: ").append("null"); sb.append("\n SessionIdHit: ").append("null"); sb.append("\n Certificate: ").append("null"); sb.append("\n SessionID: ").append("null"); assertEquals(message.toString(), sb.toString()); }