diff --git a/java-interop/src/test/java/com/wixpress/dst/greyhound/java/GreyhoundBuilderTest.java b/java-interop/src/test/java/com/wixpress/dst/greyhound/java/GreyhoundBuilderTest.java index eb58b987..6fcb6c0a 100644 --- a/java-interop/src/test/java/com/wixpress/dst/greyhound/java/GreyhoundBuilderTest.java +++ b/java-interop/src/test/java/com/wixpress/dst/greyhound/java/GreyhoundBuilderTest.java @@ -266,11 +266,8 @@ public void configure_consumer_with_exponential_blocking_retry_policy_max_interv @Test public void configure_producer_with_max_request_size_custom_props() throws Exception { - GreyhoundConfig config = new GreyhoundConfig(environment.kafka().bootstrapServers(), new HashMap() { - { - put("max.request.size", "1"); - } - }); + GreyhoundConfig config = new GreyhoundConfig(environment.kafka().bootstrapServers(), + Collections.singletonMap("max.request.size", "1")); GreyhoundProducerBuilder producerBuilder = new GreyhoundProducerBuilder(config); try (GreyhoundProducer producer = producerBuilder.build()) { CompletableFuture producerFuture = producer.produce( @@ -290,11 +287,8 @@ public void configure_consumer_with_max_poll_interval_ms_custom_props() throws E int numOfMessages = 1; List> consumedRecords = new LinkedList<>(); CountDownLatch lock = new CountDownLatch(numOfMessages); - GreyhoundConfig consumerConfig = new GreyhoundConfig(environment.kafka().bootstrapServers(), new HashMap() { - { - put("max.poll.interval.ms", "0"); - } - }); + GreyhoundConfig consumerConfig = new GreyhoundConfig(environment.kafka().bootstrapServers(), + Collections.singletonMap("max.poll.interval.ms", "0")); GreyhoundConsumersBuilder consumersBuilder = new GreyhoundConsumersBuilder(consumerConfig) .withConsumer( GreyhoundConsumer.with(