@Test
public void extractMapWithComplexType() throws OpenDataException, AttributeNotFoundException {

    CompositeTypeAndJson cdj = new CompositeTypeAndJson(STRING, "name", "roland", INTEGER, "date", 1968);
    TabularData data = getMapTabularData(cdj.getType(),cdj.getCompositeData(),TEST_VALUE);
    JSONObject result = (JSONObject) extract(true,data);
    assertEquals(result.size(), 2);
    assertTrue(result.containsKey("indexNames"));
    assertTrue(result.containsKey("values"));
    List indexNames = (List) result.get("indexNames");
    assertEquals(indexNames.size(), 1);
    assertTrue(indexNames.contains("key"));
    List values = (List) result.get("values");
    assertEquals(values.size(),1);
    JSONObject value = (JSONObject) values.get(0);
    JSONObject key = (JSONObject) value.get("key");
    assertEquals(key.get("name"),"roland");
    assertEquals(key.get("date"),1968);
    assertEquals(key.size(), 2);
    assertEquals(value.get("value"), TEST_VALUE);
    assertEquals(key.size(),2);
}