diff --git a/core-kotlin-2/src/test/kotlin/com/baeldung/lists/ListsUnitTest.kt b/core-kotlin-2/src/test/kotlin/com/baeldung/lists/ListsUnitTest.kt index 1e7136d08b..6fa7983689 100644 --- a/core-kotlin-2/src/test/kotlin/com/baeldung/lists/ListsUnitTest.kt +++ b/core-kotlin-2/src/test/kotlin/com/baeldung/lists/ListsUnitTest.kt @@ -2,6 +2,7 @@ package com.baeldung.lists import org.junit.jupiter.api.Test import kotlin.test.assertEquals +import kotlin.test.assertFalse import kotlin.test.assertTrue class ListsUnitTest { @@ -26,7 +27,8 @@ class ListsUnitTest { fun whenFilterNotWithPredicate_thenMatchingItemsAreReturned() { //Returns a list containing only elements not matching the given predicate. val theMehBatmans = batmans.filterNot { actor -> actor.contains("a") } - assertTrue(!theMehBatmans.contains("Christian Bale") && !theMehBatmans.contains("Michael Keaton")) + assertFalse(theMehBatmans.contains("Christian Bale") && theMehBatmans.contains("Michael Keaton")) + assertTrue(theMehBatmans.contains("Ben Affleck") && theMehBatmans.contains("George Clooney")) } } \ No newline at end of file