@Test
public void expectValidationFailsForInvalidHost() {

    final HostValidator underTest = getHostValidatorWithAllowlist();
    final HostValidationResult validationResult = underTest.validateHost("ditto");
    assertThat(validationResult).extracting(HostValidationResult::isValid).isEqualTo(false);
    final ConnectionConfigurationInvalidException exception = validationResult.toException(DITTO_HEADERS);
    assertThat(exception.getDittoHeaders()).isEqualTo(DITTO_HEADERS);
    assertThat(exception.getMessage()).contains("The configured host 'ditto' is invalid");
}