Skip to content

Commit eb148bd

Browse files
Use Assertions#assertThatIllegalStateException
Signed-off-by: Tran Ngoc Nhan <[email protected]>
1 parent ca05a71 commit eb148bd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

spring-kafka/src/test/java/org/springframework/kafka/support/serializer/StringOrBytesSerializerTests.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import org.springframework.kafka.test.utils.KafkaTestUtils;
2727

2828
import static org.assertj.core.api.Assertions.assertThat;
29-
import static org.assertj.core.api.Assertions.assertThatExceptionOfType;
29+
import static org.assertj.core.api.Assertions.assertThatIllegalStateException;
3030

3131
/**
3232
* @author Gary Russell
@@ -54,7 +54,7 @@ void test() {
5454
serializer.configure(configs, false);
5555
assertThat(KafkaTestUtils.getPropertyValue(serializer, "stringSerializer.encoding")).isEqualTo(StandardCharsets.UTF_16);
5656
assertThat(serializer.serialize("null", null)).isNull();
57-
assertThatExceptionOfType(IllegalStateException.class).isThrownBy(() -> serializer.serialize("ex", 0))
57+
assertThatIllegalStateException().isThrownBy(() -> serializer.serialize("ex", 0))
5858
.withMessage("This serializer can only handle byte[], Bytes or String values");
5959
}
6060

0 commit comments

Comments
 (0)