@Test
public void testGetFromJsonMap() {

    String sampleJson = "{"
            + "\"key1\":\"val1\","
            + "\"key2\":[\"val21\", \"val22\"],"
            + "\"key3\":{\"key31\":false,\"key32\":false}"
            + "}";
    String val1 = Utils.getJsonMapValue(sampleJson, "key1", String.class);
    assertTrue(val1.equals("val1"));
    List<String> val2 = Utils.getJsonMapValue(sampleJson, "key2",
            new TypeToken<List<String>>() {
            }.getType());
    assertTrue(val2.size() == 2);
    assertTrue(val2.contains("val21"));
    assertTrue(val2.contains("val22"));
    Map<String, Boolean> val3 = Utils.getJsonMapValue(sampleJson, "key3",
            new TypeToken<Map<String, Boolean>>() {
            }.getType());
    assertTrue(val3.size() == 2);
    assertTrue(val3.containsKey("key31"));
    assertTrue(val3.containsKey("key32"));
}