assert result.getLong("totalSize") == 17;
JSONArray resultItems = result.getJSONArray("items");
for (int i = 0; i < resultItems.length(); i++) {
JSONObject item = ((JSONObject) resultItems.get(i)).getJSONObject("item");
Classification classification = jsonProvider.fromJson(item.toString(), Classification.class);
assert classification != null;
assert classification.getName() != null;
JSONArray childItems = ((JSONObject) resultItems.get(i)).optJSONArray("childItems");
assert childItems == null;
}
result = Client.create().resource(HOSTURL + "/browse/Classification?itemInfo=true&offset=5&size=10&childs=true").accept(MediaType.APPLICATION_JSON).get(JSONObject.class);
assert result.getLong("size") == 10;
assert result.getLong("offset") == 5;
assert result.getLong("totalSize") == 17;
resultItems = result.getJSONArray("items");
for (int i = 0; i < resultItems.length(); i++) {
JSONObject item = ((JSONObject) resultItems.get(i)).getJSONObject("item");
Classification classification = jsonProvider.fromJson(item.toString(), Classification.class);
assert classification != null;
assert classification.getName() != null;
JSONArray childItems = ((JSONObject) resultItems.get(i)).optJSONArray("childItems");
assert childItems != null;
}
}