### Question:
UsersServiceImpl extends BaseApiService<Directory> implements UsersService { @Override public ListenableFuture<User> getUserMapping(String userId) throws IOException { Get get = service.users().get(userId).setProjection("full"); return batchRequest(get, retryPolicy, batchService); } private  UsersServiceImpl(Builder builder); static UsersServiceImpl fromConfiguration(CredentialFactory credentialFactory); @Override ListenableFuture<User> getUserMapping(String userId); @Override ListenableFuture<User> updateUserMapping(
      String userId, String schemaName, String attributeName, Optional<String> value); @Override Iterable<User> listUsers(String schemaName);  }### Answer:
@Test public void testGetUser() throws Exception { String userId = "user1@mydomain.com"; Users.Get getRequest = mock(Users.Get.class); when(getRequest.setProjection("full")).thenReturn(getRequest); when(users.get(userId)).thenReturn(getRequest); User toReturn = new User().setPrimaryEmail(userId); doAnswer( invocation -> { AsyncRequest<User> input = invocation.getArgument(0); setAsyncRequestResponse(input, toReturn); return null; }) .when(batchRequestService) .add(any()); ListenableFuture<User> user = usersService.getUserMapping(userId); assertEquals(toReturn, user.get()); }