### Question:
ApiCatalogManager extends AbstractService implements IApiCatalogManager { @Override public Map<String, ApiResource> getResources() throws ApsSystemException { Map<String, ApiResource> clonedApiResources = new HashMap<String, ApiResource>(); try { Map<String, ApiResource> resources = this.getResourceCacheWrapper().getMasterResources(); Iterator<String> iterator = resources.keySet().iterator(); while (iterator.hasNext()) { String resourceFullCode = iterator.next(); ApiResource resource = resources.get(resourceFullCode); clonedApiResources.put(resourceFullCode, resource.clone()); } } catch (Throwable t) { logger.error("Error extracting resources", t); throw new ApsSystemException("Error extracting resources", t); } return clonedApiResources; }  void setServiceCacheWrapper(IApiServiceCacheWrapper cacheWrapper); void setResourceCacheWrapper(IApiResourceCacheWrapper resourceCacheWrapper); void setLocationPatterns(String locationPatterns); void setApiCatalogDAO(IApiCatalogDAO apiCatalogDAO); @Override void init(); @Override ApiMethod getRelatedMethod(String showletCode); @Override @Deprecated Map<String, ApiMethod> getRelatedShowletMethods(); @Override Map<String, ApiMethod> getRelatedWidgetMethods(); @Override void updateMethodConfig(ApiMethod apiMethod); @Override void resetMethodConfig(ApiMethod apiMethod); @Deprecated @Override ApiMethod getMethod(String resourceName); @Override ApiMethod getMethod(ApiMethod.HttpMethod httpMethod, String resourceName); @Override ApiMethod getMethod(ApiMethod.HttpMethod httpMethod, String namespace, String resourceName); @Deprecated @Override Map<String, ApiMethod> getMethods(); @Override List<ApiMethod> getMethods(ApiMethod.HttpMethod httpMethod); @Override Map<String, ApiResource> getResources(); @Override ApiResource getResource(String namespace, String resourceName); @Override ApiService getApiService(String key); @Override Map<String, ApiService> getServices(); @Override Map<String, ApiService> getServices(String tag); @Override void saveService(ApiService service); @Override void deleteService(String key); @Override void updateService(ApiService service); static final String DEFAULT_LOCATION_PATTERN; }### Answer:
@Test public void testResources() throws ApsSystemException { when(resourceCacheWrapper.getMasterResources()).thenReturn(createResources()); Map<String, ApiResource> resources = this.apiCatalogManager.getResources(); assertThat(resources.size(), is(23)); }