### Question:
ModifyRequestProtocolOp extends ProtocolOp { @Override public void write(ASN1Writer stream) throws IOException { stream.writeStartSequence(OP_TYPE_MODIFY_REQUEST); stream.writeOctetString(dn); stream.writeStartSequence(); for(RawModification mod : modifications) { mod.write(stream); } stream.writeEndSequence(); stream.writeEndSequence(); } ModifyRequestProtocolOp(ByteString dn);  ModifyRequestProtocolOp(ByteString dn,
      List<RawModification> modifications); ByteString getDN(); List<RawModification> getModifications(); @Override byte getType(); @Override String getProtocolOpName(); @Override void write(ASN1Writer stream); @Override void toString(StringBuilder buffer); @Override void toString(StringBuilder buffer, int indent);  }### Answer:
@Test(expectedExceptions = Exception.class) public void testNullEncodeDecode() throws Exception { ByteStringBuilder builder = new ByteStringBuilder(); ASN1Writer writer = ASN1.getWriter(builder); ModifyRequestProtocolOp modifyEncoded; modifyEncoded = new ModifyRequestProtocolOp(null, null); modifyEncoded.write(writer); ASN1Reader reader = ASN1.getReader(builder.toByteString()); LDAPReader.readProtocolOp(reader); }