@Test
@SuppressWarnings("all")
public void runOfflineUserDataJobExceptionTest() throws Exception {

  StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT);
  mockOfflineUserDataJobService.addException(exception);
  try {
    OfflineUserDataJobName resourceName =
        OfflineUserDataJobName.of("[CUSTOMER]", "[OFFLINE_USER_DATA_JOB]");
    client.runOfflineUserDataJobAsync(resourceName).get();
    Assert.fail("No exception raised");
  } catch (ExecutionException e) {
    Assert.assertEquals(InvalidArgumentException.class, e.getCause().getClass());
    InvalidArgumentException apiException = (InvalidArgumentException) e.getCause();
    Assert.assertEquals(StatusCode.Code.INVALID_ARGUMENT, apiException.getStatusCode().getCode());
  }
}