### Question:
HiveMetastoreCloudStorageServiceConfigProvider implements CmTemplateComponentConfigProvider { @Override public boolean isConfigurationNeeded(CmTemplateProcessor cmTemplateProcessor, TemplatePreparationObject source) { return source.getFileSystemConfigurationView().isPresent() && cmTemplateProcessor.isRoleTypePresentInService(getServiceType(), getRoleTypes()); }  @Override List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject source); @Override String getServiceType(); @Override List<String> getRoleTypes(); @Override boolean isConfigurationNeeded(CmTemplateProcessor cmTemplateProcessor, TemplatePreparationObject source); static final String HIVE_SERVICE_CONFIG_SAFETY_VALVE; static final String HMS_METASTORE_DIR; static final String HMS_METASTORE_EXTERNAL_DIR; static final String HMS_METASTORE_REPLICA_DIR_TEMPLATE_LOCATION; static final String HMS_METASTORE_REPLICA_DIR; static final String HMS_METASTORE_DIR_TEMPLATE_PARAM; static final String HMS_METASTORE_EXTERNAL_DIR_TEMPLATE_PARAM; }### Answer:
@Test public void testIsConfigurationNeededShouldReturnFalseWhenNoHMSRole() { TemplatePreparationObject preparationObject = getTemplatePreparationObject(true); String inputJson = getBlueprintText("input/clouderamanager-nometastore.bp"); CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson); boolean configNeeded = underTest.isConfigurationNeeded(cmTemplateProcessor, preparationObject); assertFalse(configNeeded); }
@Test public void testIsConfigurationNeededShouldReturnTrueWhenHMSRoleProvided() { TemplatePreparationObject preparationObject = getTemplatePreparationObject(true); String inputJson = getBlueprintText("input/clouderamanager.bp"); CmTemplateProcessor cmTemplateProcessor = new CmTemplateProcessor(inputJson); boolean configNeeded = underTest.isConfigurationNeeded(cmTemplateProcessor, preparationObject); assertTrue(configNeeded); }