diff --git a/agent/src/test/java/com/zegelin/cassandra/exporter/cli/HarvesterOptionsTest.java b/common/src/test/java/com/zegelin/cassandra/exporter/cli/HarvesterOptionsTest.java similarity index 71% rename from agent/src/test/java/com/zegelin/cassandra/exporter/cli/HarvesterOptionsTest.java rename to common/src/test/java/com/zegelin/cassandra/exporter/cli/HarvesterOptionsTest.java index ba2cb59..2661b9d 100644 --- a/agent/src/test/java/com/zegelin/cassandra/exporter/cli/HarvesterOptionsTest.java +++ b/common/src/test/java/com/zegelin/cassandra/exporter/cli/HarvesterOptionsTest.java @@ -10,22 +10,22 @@ import java.util.Set; import java.util.stream.Collectors; -import static org.testng.Assert.*; +import static org.assertj.core.api.Assertions.assertThat; public class HarvesterOptionsTest { - static Set exclusionStrings = ImmutableSet.of("test_collector", "test:mbean=foo"); - static Set exclusions = exclusionStrings.stream() + private static Set exclusionStrings = ImmutableSet.of("test_collector", "test:mbean=foo"); + private static Set exclusions = exclusionStrings.stream() .map(Harvester.Exclusion::create) .collect(Collectors.toSet()); - @org.testng.annotations.Test + @Test public void testSetExclusions() { final HarvesterOptions harvesterOptions = new HarvesterOptions(); harvesterOptions.setExclusions(exclusionStrings); - assertEquals(harvesterOptions.exclusions, exclusions); + assertThat(harvesterOptions.exclusions).isEqualTo(exclusions); } @Test @@ -38,6 +38,6 @@ public void testSetExclusionsFromFile() throws IOException { harvesterOptions.setExclusions(ImmutableSet.of(String.format("@%s", tempFile))); - assertEquals(harvesterOptions.exclusions, exclusions); + assertThat(harvesterOptions.exclusions).isEqualTo(exclusions); } -} \ No newline at end of file +}