diff --git a/sonar-go-plugin/src/test/java/org/sonar/go/plugin/GoCheckListTest.java b/sonar-go-plugin/src/test/java/org/sonar/go/plugin/GoCheckListTest.java index 69b24aa0..649cfe71 100644 --- a/sonar-go-plugin/src/test/java/org/sonar/go/plugin/GoCheckListTest.java +++ b/sonar-go-plugin/src/test/java/org/sonar/go/plugin/GoCheckListTest.java @@ -50,9 +50,9 @@ void go_specific_checks_are_added_to_check_list() { @Test void go_excluded_not_present() { List> checks = GoCheckList.checks(); - for (Class excluded : GoCheckList.GO_CHECK_BLACK_LIST) { - assertThat(checks).doesNotContain(excluded); - } + assertThat(checks) + .doesNotContain(GoCheckList.GO_CHECK_BLACK_LIST) + .isNotEmpty(); } /**