Skip to content

Commit c791509

Browse files
committed
Optimize imports
1 parent da2830d commit c791509

12 files changed

+32
-33
lines changed

Diff for: spring-kafka-test/src/main/java/org/springframework/kafka/test/EmbeddedKafkaKraftBroker.java

+3-4
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
import java.util.function.Function;
3939
import java.util.stream.Collectors;
4040

41+
import kafka.server.KafkaConfig;
42+
import kafka.testkit.KafkaClusterTestKit;
43+
import kafka.testkit.TestKitNodes;
4144
import org.apache.commons.logging.LogFactory;
4245
import org.apache.kafka.clients.CommonClientConfigs;
4346
import org.apache.kafka.clients.admin.AdminClient;
@@ -54,10 +57,6 @@
5457
import org.springframework.core.log.LogAccessor;
5558
import org.springframework.util.Assert;
5659

57-
import kafka.server.KafkaConfig;
58-
import kafka.testkit.KafkaClusterTestKit;
59-
import kafka.testkit.TestKitNodes;
60-
6160
/**
6261
* An embedded Kafka Broker(s) using KRaft.
6362
* This class is intended to be used in the unit tests.

Diff for: spring-kafka-test/src/test/java/org/springframework/kafka/test/EmbeddedKafkaKraftBrokerTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,12 @@
1616

1717
package org.springframework.kafka.test;
1818

19-
import static org.assertj.core.api.Assertions.assertThat;
20-
2119
import org.junit.jupiter.api.Test;
2220

2321
import org.springframework.util.StringUtils;
2422

23+
import static org.assertj.core.api.Assertions.assertThat;
24+
2525
/**
2626
* @author Gary Russell
2727
* @since 3.1

Diff for: spring-kafka-test/src/test/java/org/springframework/kafka/test/EmbeddedKafkaZKBrokerTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616

1717
package org.springframework.kafka.test;
1818

19-
import static org.assertj.core.api.Assertions.assertThat;
20-
2119
import org.junit.jupiter.api.Test;
2220

21+
import static org.assertj.core.api.Assertions.assertThat;
22+
2323
/**
2424
* @author Gary Russell
2525
* @since 2.3

Diff for: spring-kafka-test/src/test/java/org/springframework/kafka/test/assertj/KafkaConditionsTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,14 @@
1616

1717
package org.springframework.kafka.test.assertj;
1818

19+
import org.apache.kafka.clients.consumer.ConsumerRecord;
20+
import org.junit.jupiter.api.Test;
21+
1922
import static org.assertj.core.api.Assertions.allOf;
2023
import static org.assertj.core.api.Assertions.assertThat;
2124
import static org.springframework.kafka.test.assertj.KafkaConditions.keyValue;
2225
import static org.springframework.kafka.test.assertj.KafkaConditions.partition;
2326

24-
import org.apache.kafka.clients.consumer.ConsumerRecord;
25-
import org.junit.jupiter.api.Test;
26-
2727
/**
2828
* @author Gary Russell
2929
* @since 2.2.12

Diff for: spring-kafka-test/src/test/java/org/springframework/kafka/test/condition/EmbeddedKafkaConditionTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@
1616

1717
package org.springframework.kafka.test.condition;
1818

19-
import static org.assertj.core.api.Assertions.assertThat;
20-
2119
import org.junit.jupiter.api.Test;
2220

2321
import org.springframework.kafka.test.EmbeddedKafkaBroker;
2422
import org.springframework.kafka.test.EmbeddedKafkaZKBroker;
2523
import org.springframework.kafka.test.context.EmbeddedKafka;
2624
import org.springframework.kafka.test.utils.KafkaTestUtils;
2725

26+
import static org.assertj.core.api.Assertions.assertThat;
27+
2828
/**
2929
* @author Gary Russell
3030
* @author Michał Padula

Diff for: spring-kafka-test/src/test/java/org/springframework/kafka/test/condition/WithNestedClassContextTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package org.springframework.kafka.test.condition;
1818

19-
import static org.assertj.core.api.Assertions.assertThat;
20-
2119
import java.util.List;
2220
import java.util.concurrent.atomic.AtomicInteger;
2321

@@ -31,6 +29,8 @@
3129
import org.springframework.test.annotation.DirtiesContext;
3230
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
3331

32+
import static org.assertj.core.api.Assertions.assertThat;
33+
3434
/**
3535
* @author Lee Jaeheon
3636
* @author Soby Chacko

Diff for: spring-kafka-test/src/test/java/org/springframework/kafka/test/condition/WithSpringTestContextTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package org.springframework.kafka.test.condition;
1818

19-
import static org.assertj.core.api.Assertions.assertThat;
20-
2119
import org.junit.jupiter.api.Test;
2220

2321
import org.springframework.beans.factory.annotation.Autowired;
@@ -27,6 +25,8 @@
2725
import org.springframework.test.annotation.DirtiesContext;
2826
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
2927

28+
import static org.assertj.core.api.Assertions.assertThat;
29+
3030
/**
3131
* @author Gary Russell
3232
* @since 2.7.2

Diff for: spring-kafka-test/src/test/java/org/springframework/kafka/test/context/EmbeddedKafkaContextCustomizerTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package org.springframework.kafka.test.context;
1818

19-
import static org.assertj.core.api.Assertions.assertThat;
20-
2119
import org.junit.jupiter.api.BeforeEach;
2220
import org.junit.jupiter.api.Test;
2321

@@ -27,6 +25,8 @@
2725
import org.springframework.kafka.test.EmbeddedKafkaBroker;
2826
import org.springframework.kafka.test.utils.KafkaTestUtils;
2927

28+
import static org.assertj.core.api.Assertions.assertThat;
29+
3030
/**
3131
* @author Oleg Artyomov
3232
* @author Sergio Lourenco

Diff for: spring-kafka-test/src/test/java/org/springframework/kafka/test/hamcrest/KafkaMatchersTests.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -16,20 +16,20 @@
1616

1717
package org.springframework.kafka.test.hamcrest;
1818

19-
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
20-
import static org.hamcrest.MatcherAssert.assertThat;
21-
import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasKey;
22-
import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasPartition;
23-
import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasTimestamp;
24-
import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasValue;
25-
2619
import java.util.Optional;
2720

2821
import org.apache.kafka.clients.consumer.ConsumerRecord;
2922
import org.apache.kafka.common.header.internals.RecordHeaders;
3023
import org.apache.kafka.common.record.TimestampType;
3124
import org.junit.jupiter.api.Test;
3225

26+
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
27+
import static org.hamcrest.MatcherAssert.assertThat;
28+
import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasKey;
29+
import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasPartition;
30+
import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasTimestamp;
31+
import static org.springframework.kafka.test.hamcrest.KafkaMatchers.hasValue;
32+
3333
/**
3434
* @author Biju Kunjummen
3535
*

Diff for: spring-kafka-test/src/test/java/org/springframework/kafka/test/junit/GlobalEmbeddedKafkaTestExecutionListenerTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package org.springframework.kafka.test.junit;
1818

19-
import static org.assertj.core.api.Assertions.assertThat;
20-
2119
import java.io.BufferedOutputStream;
2220
import java.io.File;
2321
import java.io.FileOutputStream;
@@ -49,6 +47,8 @@
4947

5048
import org.springframework.util.DefaultPropertiesPersister;
5149

50+
import static org.assertj.core.api.Assertions.assertThat;
51+
5252
/**
5353
* @author Artem Bilan
5454
*

Diff for: spring-kafka-test/src/test/java/org/springframework/kafka/test/rule/AddressableEmbeddedBrokerTests.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,6 @@
1616

1717
package org.springframework.kafka.test.rule;
1818

19-
import static org.assertj.core.api.Assertions.assertThat;
20-
2119
import java.io.IOException;
2220
import java.net.ServerSocket;
2321
import java.util.Map;
@@ -39,6 +37,8 @@
3937
import org.springframework.test.annotation.DirtiesContext;
4038
import org.springframework.test.context.junit.jupiter.SpringJUnitConfig;
4139

40+
import static org.assertj.core.api.Assertions.assertThat;
41+
4242
/**
4343
* @author Gary Russell
4444
* @author Kamill Sokol

Diff for: spring-kafka-test/src/test/java/org/springframework/kafka/test/utils/KafkaTestUtilsTests.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,6 @@
1616

1717
package org.springframework.kafka.test.utils;
1818

19-
import static org.assertj.core.api.Assertions.assertThat;
20-
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
21-
2219
import java.time.Duration;
2320
import java.util.List;
2421
import java.util.Map;
@@ -38,6 +35,9 @@
3835
import org.springframework.kafka.test.EmbeddedKafkaBroker;
3936
import org.springframework.kafka.test.context.EmbeddedKafka;
4037

38+
import static org.assertj.core.api.Assertions.assertThat;
39+
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
40+
4141
/**
4242
* @author Gary Russell
4343
* @author Artem Bilan

0 commit comments

Comments
 (0)