### Question:
UserEntityJsonMapper { public UserEntity transformUserEntity(String userJsonResponse) throws JsonSyntaxException { final Type userEntityType = new TypeToken<UserEntity>() {}.getType(); return this.gson.fromJson(userJsonResponse, userEntityType); } @Inject  UserEntityJsonMapper(); UserEntity transformUserEntity(String userJsonResponse); List<UserEntity> transformUserEntityCollection(String userListJsonResponse);  }### Answer:
@Test public void testTransformUserEntityHappyCase() { UserEntity userEntity = userEntityJsonMapper.transformUserEntity(JSON_RESPONSE_USER_DETAILS); assertThat(userEntity.getUserId(), is(1)); assertThat(userEntity.getFullname(), is(equalTo("Simon Hill"))); assertThat(userEntity.getEmail(), is(equalTo("jcooper@babbleset.edu"))); }
@Test public void testTransformUserEntityNotValidResponse() { expectedException.expect(JsonSyntaxException.class); userEntityJsonMapper.transformUserEntity("ironman"); }