JsonSerializer { public UserEntity deserialize(String jsonString) { UserEntity userEntity = gson.fromJson(jsonString, UserEntity.class); return userEntity; } JsonSerializer(); String serialize(UserEntity userEntity); UserEntity deserialize(String jsonString);  }
@Test public void testDesearializeHappyCase() { UserEntity userEntity = jsonSerializer.deserialize(JSON_RESPONSE); assertThat(userEntity.getUserId(), is(1)); assertThat(userEntity.getFullname(), is("Simon Hill")); assertThat(userEntity.getFollowers(), is(7484)); }