From 508b4a2939cb8170a75c51ac20a3b3c65c6519f9 Mon Sep 17 00:00:00 2001 From: Ali Dehghani Date: Fri, 31 Jul 2020 15:31:51 +0430 Subject: [PATCH] Added Reified Style to the List Example --- .../kotlin/com/baeldung/kotlin/jackson/JacksonUnitTest.kt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/kotlin-libraries-2/src/test/kotlin/com/baeldung/kotlin/jackson/JacksonUnitTest.kt b/kotlin-libraries-2/src/test/kotlin/com/baeldung/kotlin/jackson/JacksonUnitTest.kt index 95df57fb1e..0c72edc2fd 100644 --- a/kotlin-libraries-2/src/test/kotlin/com/baeldung/kotlin/jackson/JacksonUnitTest.kt +++ b/kotlin-libraries-2/src/test/kotlin/com/baeldung/kotlin/jackson/JacksonUnitTest.kt @@ -85,7 +85,11 @@ class JacksonUnitTest { val movie1 = Movie("Endgame", "Marvel", 9.2f) val movie2 = Movie("Shazam", "Warner Bros", 7.6f) assertTrue(movieList.contains(movie1)) - assertTrue(movieList.contains(movie2)) + assertTrue(movieList.contains(movie2)) + + val sameList = mapper.readValue>(json) + assertTrue(sameList.contains(movie1)) + assertTrue(sameList.contains(movie2)) } @Test