### Question:
LevelsOfAssuranceConfigValidator { protected void validateAllIDPsSupportLOA1orLOA2(Set<IdentityProviderConfig> identityProviderConfig) { List<IdentityProviderConfig> badIDPConfigs = identityProviderConfig.stream() .filter(x -> x.getSupportedLevelsOfAssurance().isEmpty() || containsUnsupportedLOAs(x)) .collect(Collectors.toList()); if(!badIDPConfigs.isEmpty()) { throw ConfigValidationException.createIDPLevelsOfAssuranceUnsupportedException(badIDPConfigs); } }  void validateLevelsOfAssurance(final Set<IdentityProviderConfig> identityProviderConfig,
                                           final Set<TransactionConfig> transactionConfig);  }### Answer:
@Test public void checkIDPConfigIsWithinVerifyPolicyLevelsOfAssurance() { Set<IdentityProviderConfig> identityProviderConfig = Set.of(loa1And2Idp); levelsOfAssuranceConfigValidator.validateAllIDPsSupportLOA1orLOA2(identityProviderConfig); }
@Test public void shouldAllowSingleLevelOfAssurance() { Set<IdentityProviderConfig> identityProviderConfig = Set.of(loa1Idp); levelsOfAssuranceConfigValidator.validateAllIDPsSupportLOA1orLOA2(identityProviderConfig); }
@Test(expected = ConfigValidationException.class) public void checkValidationThrowsExceptionWhenIDPSupportsAnLOAThatIsOutsideVerifyPolicyLevelsOfAssurance() { Set<IdentityProviderConfig> identityProviderConfig = Set.of(loa1To3Idp); levelsOfAssuranceConfigValidator.validateAllIDPsSupportLOA1orLOA2(identityProviderConfig); }