### Question:
CoAPRxResponsePacket extends XBeeAPIPacket { public void setProtocol(IPProtocol protocol) { if (protocol == null) throw new NullPointerException(ERROR_PROTOCOL_NULL); this.protocol = protocol; } CoAPRxResponsePacket(int frameID, Inet6Address destAddress, Inet6Address sourceAddress,
			int destPort, int sourcePort, IPProtocol protocol, RestFulStatusEnum restFulStatus, byte[] rfData); static CoAPRxResponsePacket createPacket(byte[] payload); @Override boolean needsAPIFrameID(); @Override boolean isBroadcast(); Inet6Address getDestAddress(); void setDestAddress(Inet6Address destAddress); Inet6Address getSourceAddress(); void setSourceAddress(Inet6Address sourceAddress); int getDestPort(); void setDestPort(int destPort); int getSourcePort(); void setSourcePort(int sourcePort); IPProtocol getProtocol(); void setProtocol(IPProtocol protocol); void setStatus(RestFulStatusEnum restFulStatus); RestFulStatusEnum getStatus(); void setData(byte[] rfData); byte[] getData(); @Override LinkedHashMap<String, String> getAPIPacketParameters();  }### Answer:
@Test public final void testSetProtocolNull() { CoAPRxResponsePacket packet = new CoAPRxResponsePacket(frameID, destAddress, sourceAddress, destPort, sourcePort, protocol, restFulStatus, data); exception.expect(NullPointerException.class); exception.expectMessage(is(equalTo("Protocol cannot be null."))); packet.setProtocol(null); }