### Question:
ATCommandPacket extends XBeeAPIPacket { public byte[] getParameter() { return parameter; } ATCommandPacket(int frameID, String command, String parameter);  ATCommandPacket(int frameID, String command, byte[] parameter); static ATCommandPacket createPacket(byte[] payload); @Override boolean needsAPIFrameID(); String getCommand(); void setParameter(String parameter); void setParameter(byte[] parameter); byte[] getParameter(); String getParameterAsString(); @Override boolean isBroadcast(); @Override LinkedHashMap<String, String> getAPIPacketParameters();  }### Answer:
@Test public final void testGetParameter() { int frameID = 0x10; String command = "NI"; String parameterToSet = "newNIValue"; ATCommandPacket packet = new ATCommandPacket(frameID, command, parameterToSet); byte[] value = packet.getParameter(); assertThat("Returned parameter must be '" + parameterToSet + "'", value, is(equalTo(parameterToSet.getBytes()))); }
@Test public final void testGetParameterNullValue() { int frameID = 0x10; String command = "NI"; ATCommandPacket packet = new ATCommandPacket(frameID, command, (byte[])null); byte[] value = packet.getParameter(); assertThat("Returned parameter must be 'null'", value, is(equalTo(null))); }