CatalogCategoryTree tree = (CatalogCategoryTree) response.getMessage().getPayload();
assertTrue(tree.getCategory_id() == parentCategoryId);
CatalogCategoryEntity[] children = tree.getChildren();
CatalogCategoryEntity child = children[0]; // We only created 1 child.
assertTrue(child.getCategory_id() == childCategoryId);
assertTrue(child.getParent_id() == parentCategoryId);
}
catch (Exception e) {
e.printStackTrace();
fail();
}