### Question:
TXSMSPacket extends XBeeAPIPacket { public String getData() { return data; } TXSMSPacket(int frameID, String phoneNumber, String data); static TXSMSPacket createPacket(byte[] payload); @Override boolean needsAPIFrameID(); @Override boolean isBroadcast(); void setPhoneNumber(String phoneNumber); byte[] getPhoneNumberByteArray(); String getPhoneNumber(); void setData(String data); String getData(); @Override LinkedHashMap<String, String> getAPIPacketParameters();  }### Answer:
@Test public final void testGetDataNullData() { data = null; TXSMSPacket packet = new TXSMSPacket(frameID, phoneNumber, data); String result = packet.getData(); assertThat("Data must be the same", result, is(equalTo(data))); assertThat("Data must be null", result, is(nullValue(String.class))); }
@Test public final void testGetDataValidData() { TXSMSPacket packet = new TXSMSPacket(frameID, phoneNumber, data); String result = packet.getData(); assertThat("Data must be the same", result, is(equalTo(data))); }