@Test void isConfigurationNotNeededWithRoleTypePresent() { lenient().when(cmTemplateProcessor.isRoleTypePresentInService(anyString(), anyList())).thenReturn(true); TemplatePreparationObject tpo = Builder.builder() .build(); assertThat(underTest.isConfigurationNeeded(cmTemplateProcessor, tpo)).isFalse(); }
@Override public boolean isConfigurationNeeded(CmTemplateProcessor cmTemplateProcessor, TemplatePreparationObject source) { return cmTemplateProcessor.isRoleTypePresentInService(getServiceType(), getRoleTypes()) && source.getKerberosConfig().isPresent(); }
HiveKnoxConfigProvider implements CmTemplateComponentConfigProvider { @Override public boolean isConfigurationNeeded(CmTemplateProcessor cmTemplateProcessor, TemplatePreparationObject source) { return cmTemplateProcessor.isRoleTypePresentInService(getServiceType(), getRoleTypes()) && source.getKerberosConfig().isPresent(); } }
HiveKnoxConfigProvider implements CmTemplateComponentConfigProvider { @Override public boolean isConfigurationNeeded(CmTemplateProcessor cmTemplateProcessor, TemplatePreparationObject source) { return cmTemplateProcessor.isRoleTypePresentInService(getServiceType(), getRoleTypes()) && source.getKerberosConfig().isPresent(); }  }
HiveKnoxConfigProvider implements CmTemplateComponentConfigProvider { @Override public boolean isConfigurationNeeded(CmTemplateProcessor cmTemplateProcessor, TemplatePreparationObject source) { return cmTemplateProcessor.isRoleTypePresentInService(getServiceType(), getRoleTypes()) && source.getKerberosConfig().isPresent(); }  @Override List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject templatePreparationObject); @Override String getServiceType(); @Override List<String> getRoleTypes(); @Override boolean isConfigurationNeeded(CmTemplateProcessor cmTemplateProcessor, TemplatePreparationObject source); }
HiveKnoxConfigProvider implements CmTemplateComponentConfigProvider { @Override public boolean isConfigurationNeeded(CmTemplateProcessor cmTemplateProcessor, TemplatePreparationObject source) { return cmTemplateProcessor.isRoleTypePresentInService(getServiceType(), getRoleTypes()) && source.getKerberosConfig().isPresent(); }  @Override List<ApiClusterTemplateConfig> getServiceConfigs(CmTemplateProcessor templateProcessor, TemplatePreparationObject templatePreparationObject); @Override String getServiceType(); @Override List<String> getRoleTypes(); @Override boolean isConfigurationNeeded(CmTemplateProcessor cmTemplateProcessor, TemplatePreparationObject source);  }