From 1df6c03847144e5ac34e447a7e362dc64c28058c Mon Sep 17 00:00:00 2001 From: capstan Date: Fri, 6 Sep 2019 08:13:29 +0200 Subject: [PATCH] Mockito.spy cannot work on final objects. Fixes #16. --- src/test/java/com/github/fge/jackson/JsonNodeReaderTest.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/test/java/com/github/fge/jackson/JsonNodeReaderTest.java b/src/test/java/com/github/fge/jackson/JsonNodeReaderTest.java index 414ebd3..923fc39 100644 --- a/src/test/java/com/github/fge/jackson/JsonNodeReaderTest.java +++ b/src/test/java/com/github/fge/jackson/JsonNodeReaderTest.java @@ -50,7 +50,7 @@ public final class JsonNodeReaderTest public void streamIsClosedOnRead() throws IOException { - final Supplier supplier = provideInputStream("[]"); + Supplier supplier = provideInputStream("[]"); final InputStream in = spy(supplier.get()); final JsonNode node = new JsonNodeReader().fromInputStream(in); verify(in).close(); @@ -61,7 +61,7 @@ public void streamIsClosedOnRead() public void readerIsClosedOnRead() throws IOException { - final Supplier supplier = provideReader("[]"); + Supplier supplier = provideReader("[]"); final Reader reader = spy(supplier.get()); final JsonNode node = new JsonNodeReader().fromReader(reader); assertEquals(node, new ObjectMapper().readTree(supplier.get()));