@Test
public void testFromMap() throws Exception {

  Map<String, String> map = new HashMap<String, String>();
  JSONObject json;
  map.put("key", "value");
  map.put("key with spaces", "value");
  json = JSONUtils.fromMap(map);
  assertEquals("value", json.getString("key"));
  assertEquals("value", json.getString("key with spaces"));
}