TargetData extends CObject { public int getNumJsonObject(final String type) { int rtn = 0; final List<JSONObject> temp = getCollectionTypeData().get(type); if (temp != null) { rtn = temp.size(); } return rtn; } TargetData(final JSONArray jsonArr); JSONObject getJsonObjectAtIdx(final String type, final int index); int getNumJsonObject(final String type);  }
@Test public void getNumJsonObject_Foobar_ShouldReturn0() { assert (td.getNumJsonObject("foobar") == 0); }
@Test public void getNumJsonObject_Functions_ShouldReturn9() { assert (td.getNumJsonObject("functions") == 9); }