KafkaValidator extends AbstractProtocolValidator { @Override protected void validateSource(final Source source, final DittoHeaders dittoHeaders, final Supplier<String> sourceDescription) { final String message = "Kafka connectivity currently does not provide sources."; throw ConnectionConfigurationInvalidException.newBuilder(message) .dittoHeaders(dittoHeaders) .build(); } private  KafkaValidator(); static KafkaValidator getInstance(); @Override ConnectionType type(); @Override void validate(final Connection connection, final DittoHeaders dittoHeaders, final ActorSystem actorSystem);  }
@Test public void testSourcesAreInvalid() { final Source source = ConnectivityModelFactory.newSource(AUTHORIZATION_CONTEXT, "any"); assertThatExceptionOfType(ConnectionConfigurationInvalidException.class) .isThrownBy(() -> underTest.validateSource(source, DittoHeaders.empty(), () -> "")); }