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