@Test
public void extractWithWildCardPath() throws OpenDataException, MalformedObjectNameException, AttributeNotFoundException {

    TabularTypeAndJson taj = new TabularTypeAndJson(
            new String[] { "id"},
            new CompositeTypeAndJson(
                    LONG,"id",null,
                    OBJECTNAME,"oName",null,
                    BOOLEAN,"flag",null
            ));
    TabularData data = new TabularDataSupport(taj.getType());
    data.put(new CompositeDataSupport(
            taj.getType().getRowType(),
            new String[]{"id","oName","flag" },
            new Object[]{10L,new ObjectName("test:type=bundle"), false}
    ));
    data.put(new CompositeDataSupport(
            taj.getType().getRowType(),
            new String[]{"id","oName","flag" },
            new Object[]{20L,new ObjectName("java.lang:type=Memory"), true}
    ));
    // Path: */*/domain --> 1. Level: 10, 20 -- 2. Level: CD key-value (e.g {id: 10, oName: test=type...}), -- 3. level: Objects
    // Here: Only ObjetNames should be picked
    JSONObject result = (JSONObject) extract(true, data, null, null,"domain");
    assertEquals(result.size(),2); // 10 & 20
    JSONObject inner = (JSONObject) result.get(10L);
    assertEquals(inner.size(),1);
    assertEquals(inner.get("oName"),"test");
    inner = (JSONObject) result.get(20L);
    assertEquals(inner.size(),1);
    assertEquals(inner.get("oName"),"java.lang");
    // Path: */oName --> 1. Level: 10,20 -- 2. Level: { oName : { 10 vals}}
    result = (JSONObject) extract(true, data, null, "oName");
    assertEquals(result.size(),2);
    inner = (JSONObject) result.get(10L);
    assertEquals(inner.get("domain"),"test");
    inner = (JSONObject) result.get(20L);
    assertEquals(inner.get("domain"),"java.lang");
}