diff --git a/nakadi-producer-starter-spring-boot-2-test/src/main/java/org/zalando/nakadiproducer/tests/Application.java b/nakadi-producer-starter-spring-boot-2-test/src/main/java/org/zalando/nakadiproducer/tests/Application.java index 30929521..10db90a9 100644 --- a/nakadi-producer-starter-spring-boot-2-test/src/main/java/org/zalando/nakadiproducer/tests/Application.java +++ b/nakadi-producer-starter-spring-boot-2-test/src/main/java/org/zalando/nakadiproducer/tests/Application.java @@ -26,8 +26,8 @@ public static void main(String[] args) throws Exception { @Bean @Primary - public DataSource dataSource() throws IOException { - return embeddedPostgres().getPostgresDatabase(); + public DataSource dataSource(EmbeddedPostgres postgres) throws IOException { + return postgres.getPostgresDatabase(); } @Bean @@ -39,9 +39,9 @@ public EmbeddedPostgres embeddedPostgres() throws IOException { public SnapshotEventGenerator snapshotEventGenerator() { return new SimpleSnapshotEventGenerator("eventtype", (withIdGreaterThan, filter) -> { if (withIdGreaterThan == null) { - return Collections.singletonList(new Snapshot("1", "foo", (Object) filter)); + return Collections.singletonList(new Snapshot("1", "foo", filter)); } else if (withIdGreaterThan.equals("1")) { - return Collections.singletonList(new Snapshot("2", "foo", (Object) filter)); + return Collections.singletonList(new Snapshot("2", "foo", filter)); } else { return new ArrayList<>(); }