@Test
void serializeMap()
{

    Map<String, Object> map = new HashMap<>();
    map.put("bool", false);
    map.put("int", 13);
    map.put("double", 0.78);
    map.put("string", "foo");
    map.put("array", new int[] { 9, 8 });
    map.put("list", Arrays.asList("one", "two"));
    map.put("map", Collections.singletonMap("level2", true));
    map.put("null", "null key value");
    String json = this.tool.serialize(map);
    // We can't predict the order in the map.
    assertTrue(json.contains("\"bool\":false"));
    assertTrue(json.contains("\"int\":13"));
    assertTrue(json.contains("\"double\":0.78"));
    assertTrue(json.contains("\"string\":\"foo\""));
    assertTrue(json.contains("\"array\":[9,8]"));
    assertTrue(json.contains("\"list\":[\"one\",\"two\"]"));
    assertTrue(json.contains("\"map\":{\"level2\":true}"));
    assertTrue(json.contains("\"null\":\"null key value\""));
}