MessageOriginalNames { public static String getName(Integer command) { if (messageNames.containsKey(command)) return messageNames.get(command); else { log.error("Unknown command: " + String.format("%04X", command)); return "UNKNOWN_COMMAND"; } }  static String getName(Integer command);  }
@Test public void runTest() { MessageOriginalNames packet = new MessageOriginalNames(); String testName = packet.getName(0x41f2); assertEquals("CMD_HISTORY_ALL", testName); }