### Question:
CoAPTxRequestPacket extends XBeeAPIPacket { public void setTransmitOptions(int transmitOptions) { if ((uri != null && !uri.contains(CoAPURI.URI_AT_COMMAND) && transmitOptions != RemoteATCommandOptions.OPTION_NONE) || (uri != null && uri.contains(CoAPURI.URI_AT_COMMAND) && transmitOptions != RemoteATCommandOptions.OPTION_NONE && transmitOptions != RemoteATCommandOptions.OPTION_APPLY_CHANGES)) throw new IllegalArgumentException(ERROR_OPTIONS_INVALID); this.transmitOptions = transmitOptions; } CoAPTxRequestPacket(int frameID, int transmitOptions, HTTPMethodEnum method,
			Inet6Address destAddress, String uri, byte[] payload); static CoAPTxRequestPacket createPacket(byte[] payload); @Override boolean needsAPIFrameID(); @Override boolean isBroadcast(); void setTransmitOptions(int transmitOptions); int getTransmitOptions(); void setMethod(HTTPMethodEnum method); HTTPMethodEnum getMethod(); void setDestAddress(Inet6Address destAddress); Inet6Address getDestAddress(); void setURI(String uri); String getURI(); void setPayload(byte[] payload); byte[] getPayload(); @Override LinkedHashMap<String, String> getAPIPacketParameters();  }### Answer:
@Test public final void testSetTransmitOptionsATURIOptionsIllegal() { CoAPTxRequestPacket packet = new CoAPTxRequestPacket(frameID, options, method, destAddress, CoAPURI.URI_AT_COMMAND, data); exception.expect(IllegalArgumentException.class); exception.expectMessage(is(equalTo("Transmit options can only be " + RemoteATCommandOptions.OPTION_NONE + " or " + RemoteATCommandOptions.OPTION_APPLY_CHANGES + "."))); packet.setTransmitOptions(0x03); }
@Test public final void testSetTransmitOptionsTXURIOptionsIllegal() { CoAPTxRequestPacket packet = new CoAPTxRequestPacket(frameID, options, method, destAddress, CoAPURI.URI_DATA_TRANSMISSION, data); exception.expect(IllegalArgumentException.class); exception.expectMessage(is(equalTo("Transmit options can only be " + RemoteATCommandOptions.OPTION_NONE + " or " + RemoteATCommandOptions.OPTION_APPLY_CHANGES + "."))); packet.setTransmitOptions(0x02); }