### Question:
DeviceRequestPacket extends XBeeAPIPacket { public void setRequestID(int requestID) { if (requestID < 0 || requestID > 255) throw new IllegalArgumentException(ERROR_REQUEST_ID_ILLEGAL); this.requestID = requestID; } DeviceRequestPacket(int requestID, String target, byte[] requestData); static DeviceRequestPacket createPacket(byte[] payload); @Override boolean needsAPIFrameID(); @Override boolean isBroadcast(); void setRequestID(int requestID); int getRequestID(); int getTransport(); int getFlags(); void setRequestTarget(String target); String getRequestTarget(); void setRequestData(byte[] requestData); byte[] getRequestData(); @Override LinkedHashMap<String, String> getAPIPacketParameters();  }### Answer:
@Test public final void testSetRequestIDBiggerThan255() { DeviceRequestPacket packet = new DeviceRequestPacket(requestID, target, data); requestID = 256; exception.expect(IllegalArgumentException.class); exception.expectMessage(is(equalTo("Device request ID must be between 0 and 255."))); packet.setRequestID(requestID); }
@Test public final void testSetRequestIDNegative() { DeviceRequestPacket packet = new DeviceRequestPacket(requestID, target, data); requestID = -1; exception.expect(IllegalArgumentException.class); exception.expectMessage(is(equalTo("Device request ID must be between 0 and 255."))); packet.setRequestID(requestID); }