PWDClientKeyExchangeMessage extends ClientKeyExchangeMessage { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("PWDClientKeyExchangeMessage:"); sb.append("\n Element: "); if (getElement() != null && getElement().getValue() != null) { sb.append(ArrayConverter.bytesToHexString(getElement().getValue())); } else { sb.append("null"); } sb.append("\n Scalar: "); if (getScalar() != null && getScalar().getValue() != null) { sb.append(ArrayConverter.bytesToHexString(getScalar().getValue())); } else { sb.append("null"); } return sb.toString(); } PWDClientKeyExchangeMessage();  PWDClientKeyExchangeMessage(Config tlsConfig); @Override PWDComputations getComputations(); @Override void prepareComputations(); @Override ProtocolMessageHandler getHandler(TlsContext context); ModifiableInteger getElementLength(); void setElementLength(ModifiableInteger elementLength); void setElementLength(int elementLength); ModifiableByteArray getElement(); void setElement(ModifiableByteArray element); void setElement(byte[] element); ModifiableInteger getScalarLength(); void setScalarLength(ModifiableInteger scalarLength); void setScalarLength(int scalarLength); ModifiableByteArray getScalar(); void setScalar(ModifiableByteArray scalar); void setScalar(byte[] scalar); @Override String toString(); @Override String toCompactString();  }
@Test public void testToString() { PWDClientKeyExchangeMessage message = new PWDClientKeyExchangeMessage(); StringBuilder sb = new StringBuilder(); sb.append("PWDClientKeyExchangeMessage:"); sb.append("\n Element: "); sb.append("null"); sb.append("\n Scalar: "); sb.append("null"); assertEquals(sb.toString(), message.toString()); }