JSONCodec { public static String createGETCHANNEL(Bridge bridge, String channelName) { Map<String, Object> data = new HashMap<String, Object>(); data.put("name", channelName); return createCommand(bridge, "GETCHANNEL", data); }  static String createSEND(Bridge bridge, Reference destination,
			Object[] args); static String createJWP(Bridge bridge, String name,
			Reference callbackRef); static String createGETCHANNEL(Bridge bridge, String channelName); static String createLEAVECHANNEL(Bridge bridge, String name,
			Reference handlerRef, Reference callbackRef); static String createJC(Bridge bridge, String name,
			Reference handlerRef, boolean writeable,
			Reference callbackRef); static String createCONNECT(Bridge bridge, String sessionId,
			String secret, String apiKey); static Map<String, Object> parseRedirector(String result);  }
@Test public void testCreateGETCHANNEL() throws JsonParseException, JsonMappingException, IOException { String gen = JSONCodec.createGETCHANNEL(bridge, "CHANNEL"); String spec= "{\"command\":\"GETCHANNEL\",\"data\":{\"name\":\"CHANNEL\"}}"; Map<String, Object> specObj = mapper.readValue(spec, new TypeReference<Map<String, Object>>() { }); Map<String, Object> genObj = mapper.readValue(gen, new TypeReference<Map<String, Object>>() { }); assertEquals(specObj, genObj); }