### Question:
TransMetaJsonDeserializer extends StdDeserializer<TransMeta> { @Override public TransMeta deserialize( JsonParser parser, DeserializationContext context ) throws IOException, JsonProcessingException { TransMeta transMeta = null; JsonNode node = parser.getCodec().readTree( parser ); ObjectMapper mapper = (ObjectMapper) parser.getCodec(); String name = node.get( IInfo.JSON_PROPERTY_NAME ).textValue(); String desc = node.get( IInfo.JSON_PROPERTY_DESCRIPTION ).textValue(); String createdBy = node.get( TransMetaJsonSerializer.JSON_PROPERTY_CREATED_BY ).textValue(); String modifiedBy = node.get( TransMetaJsonSerializer.JSON_PROPERTY_LAST_MODIFIED_BY ).textValue(); Date createdDate = new Date( node.get( TransMetaJsonSerializer.JSON_PROPERTY_CREATED_DATE ).asLong() ); Date modifiedDate = new Date( node.get( TransMetaJsonSerializer.JSON_PROPERTY_LAST_MODIFIED_DATE ).asLong() ); String path = node.get( TransMetaJsonSerializer.JSON_PROPERTY_PATH ).textValue(); transMeta = new TransMeta( null, name ); transMeta.setDescription( desc ); transMeta.setCreatedDate( createdDate ); transMeta.setCreatedUser( createdBy ); transMeta.setModifiedDate( modifiedDate ); transMeta.setModifiedUser( modifiedBy ); transMeta.setFilename( path ); deserializeParameters( transMeta, node, mapper ); deserializeVariables( transMeta, node, mapper ); deserializeConnections( transMeta, node, mapper ); deserializeSteps( transMeta, node, mapper ); deserializeHops( transMeta, node, mapper ); return transMeta; } TransMetaJsonDeserializer( Class<?> aClass );  TransMetaJsonDeserializer( Class<?> aClass, Repository repository ); Repository getRepository(); void setRepository( Repository repository ); @Override TransMeta deserialize( JsonParser parser, DeserializationContext context );  }### Answer:
@Test public void testDeserialize() throws Exception { TransMeta tm = deserializer.deserialize( parser, context ); assertNotNull( tm ); assertEquals( "Trans Name", tm.getName() ); assertEquals( "Trans Description", tm.getDescription() ); assertEquals( "rfellows", tm.getCreatedUser() ); assertNotNull( tm.getCreatedDate() ); assertEquals( "rfellows", tm.getModifiedUser() ); assertNotNull( tm.getModifiedDate() ); assertEquals( "path/to/file", tm.getFilename() ); assertEquals( root_paramsArray.size(), tm.listParameters().length ); assertEquals( root_stepsArray.size(), tm.getSteps().size() ); }