JsonUtils { public <T> JsonNode readJsonNodeFromObject(final T object) { String serializedObject = serialize(object); try (Reader objectReader = new StringReader(serializedObject)) { return READER.fromReader(objectReader); } 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 testReadJsonNodeFromObject() { JsonNode studentJsonNode = this.jsonUtils.readJsonNodeFromObject(createStudent()); assertStudentJsonNode(studentJsonNode); }