### Question:
RemoteATCommandPacket extends XBeeAPIPacket { public String getParameterAsString() { if (parameter == null) return null; return new String(parameter); } RemoteATCommandPacket(int frameID, XBee64BitAddress destAddress64, XBee16BitAddress destAddress16, 
			int transmitOptions, String command, String parameter);  RemoteATCommandPacket(int frameID, XBee64BitAddress destAddress64, XBee16BitAddress destAddress16, 
			int transmitOptions, String command, byte[] parameter); static RemoteATCommandPacket createPacket(byte[] payload); @Override boolean needsAPIFrameID(); @Override boolean isBroadcast(); XBee64BitAddress get64bitDestinationAddress(); XBee16BitAddress get16bitDestinationAddress(); int getTransmitOptions(); String getCommand(); void setParameter(String parameter); void setParameter(byte[] parameter); byte[] getParameter(); String getParameterAsString(); @Override LinkedHashMap<String, String> getAPIPacketParameters();  }### Answer:
@Test public final void testGetParameterAsString() { int frameID = 0x10; XBee64BitAddress dest64Addr = new XBee64BitAddress("0013A2004032D9AB"); XBee16BitAddress dest16Addr = new XBee16BitAddress("FFFF"); int options = 23; String command = "NI"; String parameterToSet = "newNIValue"; RemoteATCommandPacket packet = new RemoteATCommandPacket(frameID, dest64Addr, dest16Addr, options, command, parameterToSet); String value = packet.getParameterAsString(); assertThat("Returned parameter must be '" + parameterToSet + "'", value, is(equalTo(parameterToSet))); }
@Test public final void testGetParameterAsStringNullValue() { int frameID = 0x10; XBee64BitAddress dest64Addr = new XBee64BitAddress("0013A2004032D9AB"); XBee16BitAddress dest16Addr = new XBee16BitAddress("FFFF"); int options = 23; String command = "NI"; RemoteATCommandPacket packet = new RemoteATCommandPacket(frameID, dest64Addr, dest16Addr, options, command, (String)null); String value = packet.getParameterAsString(); assertThat("Returned parameter must be 'null'", value, is(equalTo(null))); }