diff --git a/connect-file-pulse-plugin/pom.xml b/connect-file-pulse-plugin/pom.xml
index 5567a9b1c..8a01ef3b8 100644
--- a/connect-file-pulse-plugin/pom.xml
+++ b/connect-file-pulse-plugin/pom.xml
@@ -381,10 +381,6 @@
io.rest-assured
json-path
-
- org.assertj
- assertj-core
-
io.streamthoughts
kafka-connect-filepulse-local-fs
diff --git a/connect-file-pulse-plugin/src/test/java/io/streamthoughts/kafka/connect/filepulse/fs/filter/DateInFilenameFileListFilterTest.java b/connect-file-pulse-plugin/src/test/java/io/streamthoughts/kafka/connect/filepulse/fs/filter/DateInFilenameFileListFilterTest.java
index 86f2ad37f..36ed5c1a5 100644
--- a/connect-file-pulse-plugin/src/test/java/io/streamthoughts/kafka/connect/filepulse/fs/filter/DateInFilenameFileListFilterTest.java
+++ b/connect-file-pulse-plugin/src/test/java/io/streamthoughts/kafka/connect/filepulse/fs/filter/DateInFilenameFileListFilterTest.java
@@ -31,8 +31,10 @@
import static io.streamthoughts.kafka.connect.filepulse.fs.filter.DateInFilenameFileListFilterTest.Fixture.invalidCutoffDate;
import static io.streamthoughts.kafka.connect.filepulse.fs.filter.DateInFilenameFileListFilterTest.Fixture.maxCutoffDate;
import static io.streamthoughts.kafka.connect.filepulse.fs.filter.DateInFilenameFileListFilterTest.Fixture.minCutoffDate;
-import static org.assertj.core.api.Assertions.assertThat;
-import static org.assertj.core.api.Assertions.assertThatThrownBy;
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+import static org.junit.jupiter.api.Assertions.assertTrue;
import static org.junit.jupiter.params.provider.Arguments.arguments;
import io.streamthoughts.kafka.connect.filepulse.source.FileObjectMeta;
@@ -52,10 +54,9 @@ class DateInFilenameFileListFilterTest {
@Test
void when_pattern_empty_configure_should_throw_exception() {
DateInFilenameFileListFilter filter = new DateInFilenameFileListFilter();
- assertThatThrownBy(() -> filter.configure(Map.of()))
- .isInstanceOf(ConfigException.class)
- .hasMessageContaining(FILE_FILTER_DATE_REGEX_EXTRACTOR_PATTERN_CONFIG)
- .hasNoCause();
+ ConfigException configException = assertThrows(ConfigException.class, () -> filter.configure(Map.of()));
+ assertNull(configException.getCause());
+ assertTrue(configException.getMessage().contains(FILE_FILTER_DATE_REGEX_EXTRACTOR_PATTERN_CONFIG));
}
@Test
@@ -65,10 +66,9 @@ void when_date_min_invalid_configure_should_throw_exception() {
FILE_FILTER_DATE_MIN_DATE_CONFIG, invalidCutoffDate);
DateInFilenameFileListFilter filter = new DateInFilenameFileListFilter();
- assertThatThrownBy(() -> filter.configure(configs))
- .isInstanceOf(ConfigException.class)
- .hasMessageContaining(FILE_FILTER_DATE_MIN_DATE_CONFIG)
- .hasNoCause();
+ ConfigException configException = assertThrows(ConfigException.class, () -> filter.configure(configs));
+ assertNull(configException.getCause());
+ assertTrue(configException.getMessage().contains(FILE_FILTER_DATE_MIN_DATE_CONFIG));
}
@Test
@@ -78,10 +78,9 @@ void when_date_max_invalid_configure_should_throw_exception() {
FILE_FILTER_DATE_MAX_DATE_CONFIG, invalidCutoffDate);
DateInFilenameFileListFilter filter = new DateInFilenameFileListFilter();
- assertThatThrownBy(() -> filter.configure(configs))
- .isInstanceOf(ConfigException.class)
- .hasMessageContaining(FILE_FILTER_DATE_MAX_DATE_CONFIG)
- .hasNoCause();
+ ConfigException configException = assertThrows(ConfigException.class, () -> filter.configure(configs));
+ assertNull(configException.getCause());
+ assertTrue(configException.getMessage().contains(FILE_FILTER_DATE_MAX_DATE_CONFIG));
}
@Test
@@ -90,10 +89,9 @@ void when_neither_max_date_nor_min_date_provided_configure_should_throw_exceptio
Map.of(FILE_FILTER_DATE_REGEX_EXTRACTOR_PATTERN_CONFIG, dateExtractorRegex);
DateInFilenameFileListFilter filter = new DateInFilenameFileListFilter();
- assertThatThrownBy(() -> filter.configure(configs))
- .isInstanceOf(ConfigException.class)
- .hasMessageContaining("At least one of")
- .hasNoCause();
+ ConfigException configException = assertThrows(ConfigException.class, () -> filter.configure(configs));
+ assertNull(configException.getCause());
+ assertTrue(configException.getMessage().contains("At least one of"));
}
private DateInFilenameFileListFilter prepareFilter(String minCutoffDate, String maxCutoffDate) {
@@ -122,7 +120,7 @@ void when_called_test_should_return_expected_value(Boolean expected,
String maxCutoffDate) {
DateInFilenameFileListFilter filter = prepareFilter(minCutoffDate, maxCutoffDate);
- assertThat(filter.test(meta)).isEqualTo(expected);
+ assertEquals(expected, filter.test(meta));
}
public static Stream when_called_test_should_return_expected_value() {
diff --git a/pom.xml b/pom.xml
index 711dfacc8..c9a549d8d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -611,12 +611,6 @@
5.3.0
test
-
- org.assertj
- assertj-core
- 3.24.2
- test
-