### Question:
Serializer { public <T> T deserialize(String string, Class<T> clazz) { return gson.fromJson(string, clazz); } @Inject  Serializer(); String serialize(Object object, Class clazz); T deserialize(String string, Class<T> clazz);  }### Answer:
@Test public void testDesearializeHappyCase() { final UserEntity userEntity = serializer.deserialize(JSON_RESPONSE, UserEntity.class); assertThat(userEntity.getUserId(), is(1)); assertThat(userEntity.getFullname(), is("Simon Hill")); assertThat(userEntity.getFollowers(), is(7484)); }