### Question:
UserSyncRequestValidator { @VisibleForTesting void validateCrnFilter(Set<String> crnFilter, Crn.ResourceType resourceType) { crnFilter.forEach(crnString -> { try { Crn crn = Crn.safeFromString(crnString); if (crn.getResourceType() != resourceType) { throw new BadRequestException(String.format("Crn %s is not of expected type %s", crnString, resourceType)); } } catch (CrnParseException e) { throw new BadRequestException(e.getMessage(), e); } }); }  void validateParameters(String accountId, String actorCrn, Set<String> environmentCrnFilter, UserSyncRequestFilter userSyncRequestFilter);  }### Answer:
@Test void testValidateCrnFilter() { underTest.validateCrnFilter(Set.of(ENV_CRN), Crn.ResourceType.ENVIRONMENT); }
@Test void testValidateCrnFilterNotCrn() { Assertions.assertThrows(BadRequestException.class, () -> { underTest.validateCrnFilter(Set.of(NOT_CRN), Crn.ResourceType.ENVIRONMENT); }); }
@Test void testValidateCrnFilterWrongResourceType() { Assertions.assertThrows(BadRequestException.class, () -> { underTest.validateCrnFilter(Set.of(ENV_CRN), Crn.ResourceType.USER); }); }