### Question:
FrameErrorPacket extends XBeeAPIPacket { @Override public LinkedHashMap<String, String> getAPIPacketParameters() { LinkedHashMap<String, String> parameters = new LinkedHashMap<String, String>(); parameters.put("Error", HexUtils.prettyHexString(HexUtils.integerToHexString(error.getID(), 1)) + " (" + error.getName() + ")"); return parameters; } FrameErrorPacket(FrameError error); static FrameErrorPacket createPacket(byte[] payload); @Override boolean needsAPIFrameID(); @Override boolean isBroadcast(); void setError(FrameError error); FrameError getError(); @Override LinkedHashMap<String, String> getAPIPacketParameters();  }### Answer:
@Test public final void testGetAPIPacketParameters() { FrameErrorPacket packet = new FrameErrorPacket(error); LinkedHashMap<String, String> packetParams = packet.getAPIPacketParameters(); assertThat("Packet parameters map size is not the expected one", packetParams.size(), is(equalTo(1))); assertThat("Returned error is not the expected one", packetParams.get("Error"), is(equalTo(HexUtils.prettyHexString(HexUtils.integerToHexString(error.getID(), 1)) + " (" + error.getName() + ")"))); }