### Question:
IODataSampleRxIndicatorWifiPacket extends XBeeAPIPacket { public void setReceiveOptions(int receiveOptions) { if (receiveOptions < 0 || receiveOptions > 255) throw new IllegalArgumentException(ERROR_OPTIONS_ILLEGAL); this.receiveOptions = receiveOptions; } IODataSampleRxIndicatorWifiPacket(Inet4Address sourceAddress, int rssi,
			int receiveOptions, byte[] rfData); static IODataSampleRxIndicatorWifiPacket createPacket(byte[] payload); @Override boolean needsAPIFrameID(); @Override boolean isBroadcast(); void setSourceAddress(Inet4Address sourceAddress); Inet4Address getSourceAddress(); void setRSSI(int rssi); int getRSSI(); void setReceiveOptions(int receiveOptions); int getReceiveOptions(); IOSample getIOSample(); byte[] getRFData(); @Override LinkedHashMap<String, String> getAPIPacketParameters();  }### Answer:
@Test public final void testSetOptionsBiggerThan255() { IODataSampleRxIndicatorWifiPacket packet = new IODataSampleRxIndicatorWifiPacket(sourceAddress, rssi, receiveOptions, data); receiveOptions = 256; exception.expect(IllegalArgumentException.class); exception.expectMessage(is(equalTo("Receive options must be between 0 and 255."))); packet.setReceiveOptions(receiveOptions); }
@Test public final void testSetOptionsNegative() { IODataSampleRxIndicatorWifiPacket packet = new IODataSampleRxIndicatorWifiPacket(sourceAddress, rssi, receiveOptions, data); receiveOptions = -1; exception.expect(IllegalArgumentException.class); exception.expectMessage(is(equalTo("Receive options must be between 0 and 255."))); packet.setReceiveOptions(receiveOptions); }