PskDheServerKeyExchangeMessage extends DHEServerKeyExchangeMessage { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("PskDheServerKeyExchangeMessage:"); sb.append("\n Modulus p: "); if (super.modulus != null && super.modulus.getValue() != null) { sb.append(ArrayConverter.bytesToHexString(modulus.getValue())); } else { sb.append("null"); } sb.append("\n Generator g: "); if (generator != null && generator.getValue() != null) { sb.append(ArrayConverter.bytesToHexString(generator.getValue())); } else { sb.append("null"); } sb.append("\n Public Key: "); if (getPublicKey() != null) { sb.append(ArrayConverter.bytesToHexString(getPublicKey().getValue(), false)); } else { sb.append("null"); } return sb.toString(); } PskDheServerKeyExchangeMessage();  PskDheServerKeyExchangeMessage(Config tlsConfig); ModifiableByteArray getIdentityHint(); void setIdentityHint(ModifiableByteArray identityHint); void setIdentityHint(byte[] identity); ModifiableInteger getIdentityHintLength(); void setIdentityHintLength(ModifiableInteger identityHintLength); void setIdentityHintLength(int identityHintLength); @Override String toString(); @Override ProtocolMessageHandler getHandler(TlsContext context); @Override String toCompactString();  }
@Test public void testToString() { StringBuilder sb = new StringBuilder(); sb.append("PskDheServerKeyExchangeMessage:"); sb.append("\n Modulus p: ").append("null"); sb.append("\n Generator g: ").append("null"); sb.append("\n Public Key: ").append("null"); assertEquals(message.toString(), sb.toString()); }