PWDServerKeyExchangeMessage extends ServerKeyExchangeMessage { @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("PWDServerKeyExchangeMessage:"); sb.append("\n Salt: "); if (getSalt() != null && getSalt().getValue() != null) { sb.append(ArrayConverter.bytesToHexString(getSalt().getValue())); } else { sb.append("null"); } sb.append("\n Curve Type: "); if (curveType != null && curveType.getValue() != null) { sb.append(EllipticCurveType.getCurveType(this.curveType.getValue())); } else { sb.append("null"); } sb.append("\n Named Curve: "); if (namedGroup != null && namedGroup.getValue() != null) { sb.append(NamedGroup.getNamedGroup(this.namedGroup.getValue())); } else { sb.append("null"); } 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(); } PWDServerKeyExchangeMessage();  PWDServerKeyExchangeMessage(Config tlsConfig); @Override PWDComputations getComputations(); @Override void prepareComputations(); @Override ProtocolMessageHandler getHandler(TlsContext context); ModifiableInteger getSaltLength(); void setSaltLength(ModifiableInteger saltLength); void setSaltLength(int saltLength); ModifiableByteArray getSalt(); void setSalt(ModifiableByteArray salt); void setSalt(byte[] salt); void setCurveType(ModifiableByte curveType); void setCurveType(byte curveType); ModifiableByte getGroupType(); ModifiableByteArray getNamedGroup(); void setNamedGroup(ModifiableByteArray namedGroup); void setNamedGroup(byte[] namedGroup); 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() { PWDServerKeyExchangeMessage message = new PWDServerKeyExchangeMessage(); StringBuilder sb = new StringBuilder(); sb.append("PWDServerKeyExchangeMessage:"); sb.append("\n Salt: "); sb.append("null"); sb.append("\n Curve Type: "); sb.append("null"); sb.append("\n Named Curve: "); sb.append("null"); sb.append("\n Element: "); sb.append("null"); sb.append("\n Scalar: "); sb.append("null"); assertEquals(sb.toString(), message.toString()); }