@Test public void shouldAddApiRolesOnYarn() { Stack stack = new Stack(); stack.setCloudPlatform(CloudPlatform.YARN.name()); ApiRoleList apiRoleList = new ApiRoleList(); ApiRole apiRole = new ApiRole(); apiRoleList.addItemsItem(apiRole); underTest.setConfigs(stack, apiRoleList); assertThat(apiRole.getConfig()).isNotNull(); assertThat(apiRole.getConfig().getItems()).allSatisfy(apiConfig -> { assertThat(apiConfig.getName()).isIn(CmMgmtYarnConfigService.SUPPRESSION_NAMES); assertThat(apiConfig.getValue()).isEqualTo(CmMgmtYarnConfigService.SUPPRESSION_VALUE); }); }
@Override public void setConfigs(Stack stack, ApiRoleList apiRoleList) { if (CloudPlatform.YARN.equalsIgnoreCase(stack.getCloudPlatform())) { apiRoleList.getItems().forEach(this::addSuppressionConfigs); } }
CmMgmtYarnConfigService implements CmConfigServiceDelegate { @Override public void setConfigs(Stack stack, ApiRoleList apiRoleList) { if (CloudPlatform.YARN.equalsIgnoreCase(stack.getCloudPlatform())) { apiRoleList.getItems().forEach(this::addSuppressionConfigs); } } }
CmMgmtYarnConfigService implements CmConfigServiceDelegate { @Override public void setConfigs(Stack stack, ApiRoleList apiRoleList) { if (CloudPlatform.YARN.equalsIgnoreCase(stack.getCloudPlatform())) { apiRoleList.getItems().forEach(this::addSuppressionConfigs); } }  }
CmMgmtYarnConfigService implements CmConfigServiceDelegate { @Override public void setConfigs(Stack stack, ApiRoleList apiRoleList) { if (CloudPlatform.YARN.equalsIgnoreCase(stack.getCloudPlatform())) { apiRoleList.getItems().forEach(this::addSuppressionConfigs); } }  @Override void setConfigs(Stack stack, ApiRoleList apiRoleList); }
CmMgmtYarnConfigService implements CmConfigServiceDelegate { @Override public void setConfigs(Stack stack, ApiRoleList apiRoleList) { if (CloudPlatform.YARN.equalsIgnoreCase(stack.getCloudPlatform())) { apiRoleList.getItems().forEach(this::addSuppressionConfigs); } }  @Override void setConfigs(Stack stack, ApiRoleList apiRoleList);  }