@Test public void testCreationWithMinimalConfiguration() throws IOException { Single<Source<Object>> single = factory.create(vertx, null, new Config(new JsonObject() .put("bootstrap.servers", "localhost:9092") .put("key.deserializer", JsonObjectDeserializer.class.getName()) .put("value.deserializer", JsonObjectDeserializer.class.getName()))); Source<Object> sink = single.blockingGet(); assertThat(sink).isInstanceOf(KafkaSource.class); }
@Override public <T> Single<Source<T>> create(Vertx vertx, String name, Config config) { return Single.just(new KafkaSource<>(vertx, name, config)); }
KafkaSourceFactory implements SourceFactory { @Override public <T> Single<Source<T>> create(Vertx vertx, String name, Config config) { return Single.just(new KafkaSource<>(vertx, name, config)); } }
KafkaSourceFactory implements SourceFactory { @Override public <T> Single<Source<T>> create(Vertx vertx, String name, Config config) { return Single.just(new KafkaSource<>(vertx, name, config)); }  }
KafkaSourceFactory implements SourceFactory { @Override public <T> Single<Source<T>> create(Vertx vertx, String name, Config config) { return Single.just(new KafkaSource<>(vertx, name, config)); }  @Override String name(); @Override Single<Source<T>> create(Vertx vertx, String name, Config config); }
KafkaSourceFactory implements SourceFactory { @Override public <T> Single<Source<T>> create(Vertx vertx, String name, Config config) { return Single.just(new KafkaSource<>(vertx, name, config)); }  @Override String name(); @Override Single<Source<T>> create(Vertx vertx, String name, Config config);  }