### Question:
TXIPv6Packet extends XBeeAPIPacket { public void setSourcePort(int sourcePort) { if (sourcePort < 0 || sourcePort > 65535) throw new IllegalArgumentException(ERROR_PORT_ILLEGAL); this.sourcePort = sourcePort; } TXIPv6Packet(int frameID, Inet6Address destAddress, int destPort, int sourcePort,
			IPProtocol protocol, byte[] data); static TXIPv6Packet createPacket(byte[] payload); @Override boolean needsAPIFrameID(); @Override boolean isBroadcast(); Inet6Address getDestAddress(); void setDestAddress(Inet6Address destAddress); int getDestPort(); void setDestPort(int destPort); int getSourcePort(); void setSourcePort(int sourcePort); IPProtocol getProtocol(); void setProtocol(IPProtocol protocol); int getTransmitOptions(); byte[] getData(); void setData(byte[] data); @Override LinkedHashMap<String, String> getAPIPacketParameters();  }### Answer:
@Test public final void testSetSourcePortNegative() { TXIPv6Packet packet = new TXIPv6Packet(frameID, destAddress, destPort, sourcePort, protocol, data); exception.expect(IllegalArgumentException.class); exception.expectMessage(is(equalTo("Port must be between 0 and 65535."))); packet.setSourcePort(-1); }
@Test public final void testSetSourcePortBigger() { TXIPv6Packet packet = new TXIPv6Packet(frameID, destAddress, destPort, sourcePort, protocol, data); exception.expect(IllegalArgumentException.class); exception.expectMessage(is(equalTo("Port must be between 0 and 65535."))); packet.setSourcePort(65536); }