### Question:
BindRequestProtocolOp extends ProtocolOp { public void toString(StringBuilder buffer) { buffer.append("BindRequest(version=").append(protocolVersion); buffer.append(", dn="); if (dn != null) { buffer.append(dn); } if (authenticationType == AuthenticationType.SIMPLE) { buffer.append(", password=").append(simplePassword); } else { buffer.append(", saslMechanism=").append(saslMechanism); if (saslCredentials != null) { buffer.append(", saslCredentials=").append(saslCredentials); } } buffer.append(")"); } BindRequestProtocolOp(ByteString dn, int protocolVersion,
                               ByteString simplePassword);  BindRequestProtocolOp(ByteString dn, String saslMechanism,
                               ByteString saslCredentials); ByteString getDN(); int getProtocolVersion(); AuthenticationType getAuthenticationType(); ByteString getSimplePassword(); String getSASLMechanism(); ByteString getSASLCredentials(); byte getType(); String getProtocolOpName(); void write(ASN1Writer stream); void toString(StringBuilder buffer); void toString(StringBuilder buffer, int indent);  }### Answer:
@Test public void testBindRequestToString() throws Exception { ByteString bindDn=ByteString.valueOfUtf8(dn); ByteString pw=ByteString.valueOfUtf8(pwd); BindRequestProtocolOp sasl = new BindRequestProtocolOp(bindDn, SASL_MECHANISM_PLAIN, pw); StringBuilder sb = new StringBuilder(); sasl.toString(sb); sasl.toString(sb, 1); }