### Question:
SendDataRequestPacket extends XBeeAPIPacket { public void setOptions(SendDataRequestOptions options) { if (options == null) throw new NullPointerException(ERROR_OPTIONS_NULL); this.options = options; } SendDataRequestPacket(int frameID, String path, String contentType, SendDataRequestOptions options, byte[] fileData); static SendDataRequestPacket createPacket(byte[] payload); @Override boolean needsAPIFrameID(); @Override boolean isBroadcast(); void setPath(String path); String getPath(); void setContentType(String contentType); String getContentType(); int getTransport(); void setOptions(SendDataRequestOptions options); SendDataRequestOptions getOptions(); void setFileData(byte[] fileData); byte[] getFileData(); @Override LinkedHashMap<String, String> getAPIPacketParameters();  }### Answer:
@Test public final void testSetOptionsNull() { SendDataRequestPacket packet = new SendDataRequestPacket(frameID, path, contentType, options, data); options = null; exception.expect(NullPointerException.class); exception.expectMessage(is(equalTo("Options cannot be null."))); packet.setOptions(options); }