### Question:
CategoryModelAdapter { public static List<Category> fromCatalogAPI(TaxonomyResponse response) { if (response == null || response.getTaxonomy() == null) { return null; } return convertChildren(response.getTaxonomy().getCategories()); } protected  CategoryModelAdapter(); static List<Category> fromCatalogAPI(TaxonomyResponse response);  }### Answer:
@Test public final void testFromCatalogAPI() { assertNotNull(new CategoryModelAdapter()); assertNull(CategoryModelAdapter.fromCatalogAPI(null)); TaxonomyResponse response = new TaxonomyResponse(); assertNull(CategoryModelAdapter.fromCatalogAPI(response)); Taxonomy taxonomy = new Taxonomy(); response.setTaxonomy(taxonomy); assertNotNull(CategoryModelAdapter.fromCatalogAPI(response)); CategoriesType categories = new CategoriesType(); taxonomy.setCategories(categories); assertNotNull(CategoryModelAdapter.fromCatalogAPI(response)); CategoryType category = new CategoryType(); category.setId(1l); category.setName("cname"); category.setUrl("http: categories.getCategory().add(category); List<Category> result = CategoryModelAdapter.fromCatalogAPI(response); assertTrue(CollectionUtils.isNotEmpty(result)); Category converted = result.get(0); assertEquals(converted.getId(), (Long)1L); assertEquals(converted.getName(), category.getName()); assertEquals(converted.getURL(), category.getUrl()); }