@Test public void deserializeWithTypeReference(@Mock TypeReference<? extends Object> reference) { String serialized = "false"; assertNull(POJOHelper.deserialize(serialized, reference)); }
public static <T extends Object> T deserialize(final String serialized, final Class<T> reference) { T result = null; try { result = MAPPER.readValue(serialized, reference); } catch (Exception e) { LOG.error("During deserialization", e); } return result; }
POJOHelper { public static <T extends Object> T deserialize(final String serialized, final Class<T> reference) { T result = null; try { result = MAPPER.readValue(serialized, reference); } catch (Exception e) { LOG.error("During deserialization", e); } return result; } }
POJOHelper { public static <T extends Object> T deserialize(final String serialized, final Class<T> reference) { T result = null; try { result = MAPPER.readValue(serialized, reference); } catch (Exception e) { LOG.error("During deserialization", e); } return result; } private  POJOHelper(); }
POJOHelper { public static <T extends Object> T deserialize(final String serialized, final Class<T> reference) { T result = null; try { result = MAPPER.readValue(serialized, reference); } catch (Exception e) { LOG.error("During deserialization", e); } return result; } private  POJOHelper(); static String serialize(final Object object); static T deserialize(final String serialized, final Class<T> reference); static T deserialize(final String serialized, final TypeReference<T> reference); }
POJOHelper { public static <T extends Object> T deserialize(final String serialized, final Class<T> reference) { T result = null; try { result = MAPPER.readValue(serialized, reference); } catch (Exception e) { LOG.error("During deserialization", e); } return result; } private  POJOHelper(); static String serialize(final Object object); static T deserialize(final String serialized, final Class<T> reference); static T deserialize(final String serialized, final TypeReference<T> reference);  }