### Question:
DeviceResponsePacket extends XBeeAPIPacket { public void setRequestID(int requestID) { if (requestID < 0 || requestID > 255) throw new IllegalArgumentException(ERROR_REQUEST_ID_ILLEGAL); this.requestID = requestID; } DeviceResponsePacket(int frameID, int requestID, byte[] responseData); static DeviceResponsePacket createPacket(byte[] payload); @Override boolean needsAPIFrameID(); @Override boolean isBroadcast(); void setRequestID(int requestID); int getRequestID(); void setResponseData(byte[] responseData); byte[] getResponseData(); @Override LinkedHashMap<String, String> getAPIPacketParameters();  }### Answer:
@Test public final void testSetRequestIDBiggerThan255() { DeviceResponsePacket packet = new DeviceResponsePacket(frameID, requestID, 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() { DeviceResponsePacket packet = new DeviceResponsePacket(frameID, requestID, data); requestID = -1; exception.expect(IllegalArgumentException.class); exception.expectMessage(is(equalTo("Device request ID must be between 0 and 255."))); packet.setRequestID(requestID); }