diff --git a/core-java-modules/core-java-lambdas/src/test/java/com/baeldung/java8/lambda/serialization/LambdaSerializationUnitTest.java b/core-java-modules/core-java-lambdas/src/test/java/com/baeldung/java8/lambda/serialization/LambdaSerializationUnitTest.java index 580319c92e..bb71e3bdb9 100644 --- a/core-java-modules/core-java-lambdas/src/test/java/com/baeldung/java8/lambda/serialization/LambdaSerializationUnitTest.java +++ b/core-java-modules/core-java-lambdas/src/test/java/com/baeldung/java8/lambda/serialization/LambdaSerializationUnitTest.java @@ -36,7 +36,7 @@ public class LambdaSerializationUnitTest { @Test public void givenSerializableConsumer_whenNoCapturing_thenSerializationSuccess() throws IOException, ClassNotFoundException { - SerializableConsumer obj = System.out::println; + SerializableConsumer obj = message -> System.out.println(message); writeAndReadObject(obj, SerializableConsumer.class); }