### Question:
ApiCatalogManager extends AbstractService implements IApiCatalogManager { @Override public Map<String, ApiService> getServices() throws ApsSystemException { Map<String, ApiService> clonedServices = new HashMap<>(); try { if (null != this.getServiceCacheWrapper().getMasterServices()) { Iterator<String> servicesIter = this.getServiceCacheWrapper().getMasterServices().keySet().iterator(); while (servicesIter.hasNext()) { String serviceKey = servicesIter.next(); clonedServices.put(serviceKey, this.getServiceCacheWrapper().getMasterServices().get(serviceKey).clone()); } } } catch (Throwable t) { logger.error("Error extracting services", t); throw new ApsSystemException("Error extracting services", t); } return clonedServices; }  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 testGetServices() throws Throwable { when(resourceCacheWrapper.getMasterResources()).thenReturn(createResources()); Map<String, ApiService> services = this.apiCatalogManager.getServices(); assertNotNull(services); assertTrue(services.isEmpty()); }