diff --git a/core-java-modules/core-java-8-2/src/test/java/com/baeldung/bifunction/BiFunctionalInterfacesUnitTest.java b/core-java-modules/core-java-8-2/src/test/java/com/baeldung/bifunction/BiFunctionalInterfacesUnitTest.java index ea63409c88..0ae59d9f77 100644 --- a/core-java-modules/core-java-8-2/src/test/java/com/baeldung/bifunction/BiFunctionalInterfacesUnitTest.java +++ b/core-java-modules/core-java-8-2/src/test/java/com/baeldung/bifunction/BiFunctionalInterfacesUnitTest.java @@ -71,7 +71,7 @@ public class BiFunctionalInterfacesUnitTest { List list1 = Arrays.asList("a", "b", "c"); List list2 = Arrays.asList(1, 2, 3); - List result = listCombiner(list1, list2, (a, b) -> a + b); + List result = listCombiner(list1, list2, (letter, number) -> letter + number); assertThat(result).containsExactly("a1", "b2", "c3"); } @@ -92,7 +92,7 @@ public class BiFunctionalInterfacesUnitTest { List list2 = Arrays.asList(0.1f, 0.2f, 4f); // algorithm to determine if the value in list1 > value in list 2 - List result = listCombiner(list1, list2, (a, b) -> a > b); + List result = listCombiner(list1, list2, (doubleNumber, floatNumber) -> doubleNumber > floatNumber); assertThat(result).containsExactly(true, true, false); } @@ -117,7 +117,7 @@ public class BiFunctionalInterfacesUnitTest { List list1 = Arrays.asList(0.1f, 0.2f, 4f); List list2 = Arrays.asList(0.1f, 0.2f, 4f); - List result = listCombiner(list1, list2, (a, b) -> a.equals(b)); + List result = listCombiner(list1, list2, (float1, float2) -> float1.equals(float2)); assertThat(result).containsExactly(true, true, true); }