### Question:
UserEngineClient { public User get(long userId) { try { return identityAPI.getUser(userId); } catch (UserNotFoundException e) { throw new APIException(new _("User not found"), e); } } UserEngineClient(IdentityAPI identityAPI); User update(long userId, UserUpdater userUpdater); User create(UserCreator creator); User get(long userId); void delete(List<Long> userIds); SearchResult<User> search(SearchOptions searchOptions); List<User> getUsersInGroup(long groupId, int startIndex, int maxResults);  }### Answer:
@Test public void get_fetch_a_user_from_engine_repository() throws Exception { userEngineClient.get(1L); verify(identityAPI).getUser(1L); }
@Test(expected = APIException.class) public void get_throw_APIException_if_user_is_not_found_in_engine_repository() throws Exception { when(identityAPI.getUser(1L)).thenThrow(new UserNotFoundException("aMessage")); userEngineClient.get(1L); }