JsonUtils { public <T> T deserializeFromFile(final String fileName, final Class<T> type) { try (InputStream fis = inputStreamFromFileName(fileName)) { return OBJECT_MAPPER.readValue(fis, type); } catch (Exception e) { LOGGER.error(UNEXPECTED_EXCEPTION, e); return null; } }  T deserializeFromFile(final String fileName, final Class<T> type); String serialize(final T object); T deserialize(final String jsonString, final Class<T> type); C deserialize(final String jsonString, final Class<C> collectionType,
            final Class<T> elementType); JsonNode readJsonNodeFromFile(final String jsonFileName); JsonNode readJsonNodeFromObject(final T object);  }
@Test public void testDeserializeFromFile() { Student student = this.jsonUtils.deserializeFromFile("student.json", Student.class); assertStudent(student); }
@Test public void testDeserializeFromNotFoundFile() { Assert.assertNull(this.jsonUtils.deserializeFromFile("student-no-found.json", Student.class)); }