### Question:
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);  }### Answer:
@Test public void shouldNotDoAnythingOnNonYcloud() { Stack stack = new Stack(); stack.setCloudPlatform(CloudPlatform.AWS.name()); ApiRoleList apiRoleList = new ApiRoleList(); underTest.setConfigs(stack, apiRoleList); assertThat(apiRoleList.getItems()).isNullOrEmpty(); }
@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); }); }