DHEServerKeyExchangeMessage extends ServerKeyExchangeMessage { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("DHEServerKeyExchangeMessage:"); sb.append("\n Modulus p: "); if (modulus != null && 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 && getPublicKey().getValue() != null) { sb.append(ArrayConverter.bytesToHexString(getPublicKey().getValue(), false)); } else { sb.append("null"); } sb.append("\n Signature and Hash Algorithm: "); if (this.getSignatureAndHashAlgorithm() != null && this.getSignatureAndHashAlgorithm().getValue() != null) { sb.append(ArrayConverter.bytesToHexString(getSignatureAndHashAlgorithm().getValue())); } else { sb.append("null"); } sb.append("\n Signature: "); if (this.getSignature() != null && this.getSignature().getValue() != null) { sb.append(ArrayConverter.bytesToHexString(this.getSignature().getValue())); } else { sb.append("null"); } return sb.toString(); } DHEServerKeyExchangeMessage();  DHEServerKeyExchangeMessage(Config tlsConfig); ModifiableByteArray getModulus(); void setModulus(ModifiableByteArray modulus); void setModulus(byte[] modulus); ModifiableByteArray getGenerator(); void setGenerator(ModifiableByteArray generator); void setGenerator(byte[] generator); ModifiableInteger getModulusLength(); void setModulusLength(ModifiableInteger modulusLength); void setModulusLength(int modulusLength); ModifiableInteger getGeneratorLength(); void setGeneratorLength(ModifiableInteger generatorLength); void setGeneratorLength(int generatorLength); @Override DHEServerComputations getComputations(); @Override String toString(); @Override ProtocolMessageHandler getHandler(TlsContext context); @Override String toCompactString(); @Override void prepareComputations(); @Override List<ModifiableVariableHolder> getAllModifiableVariableHolders();  }
@Test public void testToString() { StringBuilder sb = new StringBuilder(); sb.append("DHEServerKeyExchangeMessage:"); sb.append("\n Modulus p: ").append("null"); sb.append("\n Generator g: ").append("null"); sb.append("\n Public Key: ").append("null"); sb.append("\n Signature and Hash Algorithm: ").append("null"); sb.append("\n Signature: ").append("null"); assertEquals(message.toString(), sb.toString()); }