### Question:
IPv6IODataSampleRxIndicator extends XBeeAPIPacket { public byte[] getRFData() { if (rfData == null) return null; return Arrays.copyOf(rfData, rfData.length); } IPv6IODataSampleRxIndicator(Inet6Address sourceAddress, byte[] rfData); static IPv6IODataSampleRxIndicator createPacket(byte[] payload); @Override boolean needsAPIFrameID(); @Override boolean isBroadcast(); Inet6Address getSourceAddress(); IOSample getIOSample(); void setRFData(byte[] rfData); byte[] getRFData(); @Override LinkedHashMap<String, String> getAPIPacketParameters();  }### Answer:
@Test public final void testGetRFDataNullData() { IPv6IODataSampleRxIndicator packet = new IPv6IODataSampleRxIndicator(ipv6address, null); byte[] result = packet.getRFData(); assertThat("RF Data must be the same", result, is(equalTo(null))); assertThat("RF Data must be null", result, is(nullValue(byte[].class))); }
@Test public final void testGetRFDataInvalidData() { byte[] receivedData = new byte[]{0x68, 0x6F, 0x6C, 0x61}; IPv6IODataSampleRxIndicator packet = new IPv6IODataSampleRxIndicator(ipv6address, receivedData); byte[] result = packet.getRFData(); assertThat("RF Data must be the same", result, is(equalTo(receivedData))); assertThat("RF Data must not be the same object", result.hashCode(), is(not(equalTo(receivedData.hashCode())))); }
@Test public final void testGetRFDataValidData() { byte[] receivedData = new byte[]{0x68, 0x6F, 0x6C, 0x61, (byte)0x98, 0x11, 0x32}; IPv6IODataSampleRxIndicator packet = new IPv6IODataSampleRxIndicator(ipv6address, receivedData); byte[] result = packet.getRFData(); assertThat("RF Data must be the same", result, is(equalTo(receivedData))); assertThat("RF Data must not be the same object", result.hashCode(), is(not(equalTo(receivedData.hashCode())))); }