@Test
public void validateHardSoftTimeout() {

    AdmissionValidator<JobDescriptor> never0 = new NeverJobValidator(ValidationError.Type.HARD);
    AdmissionValidator never1 = new NeverJobValidator(ValidationError.Type.SOFT);
    AdmissionValidator validator = new AggregatingValidator(
            configuration,
            registry,
            Arrays.asList(never0, never1));
    Mono<Set<ValidationError>> mono = validator.validate(MOCK_JOB);
    StepVerifier.create(mono)
            .expectNextMatches(errors -> errors.size() == 2)
            .verifyComplete();
    Collection<ValidationError> errors = mono.block();
    validateTimeoutErrors(errors);
    Collection<ValidationError> hardErrors = errors.stream()
            .filter(error -> error.getType().equals(ValidationError.Type.HARD))
            .collect(Collectors.toList());
    assertThat(hardErrors).hasSize(1);
    Collection<ValidationError> softErrors = errors.stream()
            .filter(error -> error.getType().equals(ValidationError.Type.SOFT))
            .collect(Collectors.toList());
    assertThat(softErrors).hasSize(1);
}