### Question:
ProfilerAdminCloudStorageRoleConfigProvider extends AbstractRoleConfigProvider { @Override protected List<ApiClusterTemplateConfig> getRoleConfigs(String roleType, TemplatePreparationObject templatePreparationObject) { switch (roleType) { case ProfilerManagerRoles.PROFILER_ADMIN_AGENT: return ConfigUtils.getStorageLocationForServiceProperty(templatePreparationObject, FILE_SYSTEM_URI) .map(location -> List.of(config(FILE_SYSTEM_URI, location.getValue()))) .orElseGet(List::of); default: return List.of(); } }  @Override String getServiceType(); @Override List<String> getRoleTypes(); @Override boolean isConfigurationNeeded(CmTemplateProcessor cmTemplateProcessor, TemplatePreparationObject source);  }### Answer:
@Test public void testProfilerAdminCloudStorageRoleConfigs() { TemplatePreparationObject preparationObject = getTemplatePreparationObject(true); String inputJson = getBlueprintText("input/clouderamanager-profilers.bp"); CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson); Map<String, List<ApiClusterTemplateConfig>> roleConfigs = underTest.getRoleConfigs(cmTemplateProcessor, preparationObject); List<ApiClusterTemplateConfig> serviceConfigs = roleConfigs.get("profiler_manager-PROFILER_ADMIN_AGENT-BASE"); assertEquals(1, serviceConfigs.size()); assertEquals("file_system_uri", serviceConfigs.get(0).getName()); assertEquals("s3a: }
@Test public void testProfilerAdminCloudStorageConfigsWhenNoCloudStorageProvided() { TemplatePreparationObject preparationObject = getTemplatePreparationObject(false); String inputJson = getBlueprintText("input/clouderamanager-profilers.bp"); CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson); Map<String, List<ApiClusterTemplateConfig>> roleConfigs = underTest.getRoleConfigs(cmTemplateProcessor, preparationObject); List<ApiClusterTemplateConfig> profilerAdminConfigs = roleConfigs.get("profiler_manager-PROFILER_ADMIN_AGENT-BASE"); assertEquals(0, profilerAdminConfigs.size()); }