@Test
public void serializeJson() throws Exception
{

    Writer jsonWriter = new StringWriter();
    JsonGenerator jsonGenerator = new JsonFactory().createGenerator( jsonWriter );
    SerializerProvider serializerProvider = new ObjectMapper().getSerializerProvider();
    new CustomLastUpdatedUserSerializer().serialize( user, jsonGenerator, serializerProvider );
    jsonGenerator.flush();
    assertEquals( "{\"id\":\"jshfdkd323\",\"name\":\"Peter Brown\"}", jsonWriter.toString() );
}