@Test @SuppressWarnings("all") public void listInvoicesExceptionTest() throws Exception { StatusRuntimeException exception = new StatusRuntimeException(Status.INVALID_ARGUMENT); mockInvoiceService.addException(exception); try { String customerId = "customerId-1772061412"; String billingSetup = "billingSetup-1181632583"; String issueYear = "issueYear1443510243"; MonthOfYearEnum.MonthOfYear issueMonth = MonthOfYearEnum.MonthOfYear.UNSPECIFIED; client.listInvoices(customerId, billingSetup, issueYear, issueMonth); Assert.fail("No exception raised"); } catch (InvalidArgumentException e) { } }
public final ListInvoicesResponse listInvoices( String customerId, String billingSetup, String issueYear, MonthOfYearEnum.MonthOfYear issueMonth) { ListInvoicesRequest request = ListInvoicesRequest.newBuilder() .setCustomerId(customerId) .setBillingSetup(billingSetup) .setIssueYear(issueYear) .setIssueMonth(issueMonth) .build(); return listInvoices(request); }
InvoiceServiceClient implements BackgroundResource { public final ListInvoicesResponse listInvoices( String customerId, String billingSetup, String issueYear, MonthOfYearEnum.MonthOfYear issueMonth) { ListInvoicesRequest request = ListInvoicesRequest.newBuilder() .setCustomerId(customerId) .setBillingSetup(billingSetup) .setIssueYear(issueYear) .setIssueMonth(issueMonth) .build(); return listInvoices(request); } }
InvoiceServiceClient implements BackgroundResource { public final ListInvoicesResponse listInvoices( String customerId, String billingSetup, String issueYear, MonthOfYearEnum.MonthOfYear issueMonth) { ListInvoicesRequest request = ListInvoicesRequest.newBuilder() .setCustomerId(customerId) .setBillingSetup(billingSetup) .setIssueYear(issueYear) .setIssueMonth(issueMonth) .build(); return listInvoices(request); } protected  InvoiceServiceClient(InvoiceServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  InvoiceServiceClient(InvoiceServiceStub stub); }
InvoiceServiceClient implements BackgroundResource { public final ListInvoicesResponse listInvoices( String customerId, String billingSetup, String issueYear, MonthOfYearEnum.MonthOfYear issueMonth) { ListInvoicesRequest request = ListInvoicesRequest.newBuilder() .setCustomerId(customerId) .setBillingSetup(billingSetup) .setIssueYear(issueYear) .setIssueMonth(issueMonth) .build(); return listInvoices(request); } protected  InvoiceServiceClient(InvoiceServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  InvoiceServiceClient(InvoiceServiceStub stub); static final InvoiceServiceClient create(); static final InvoiceServiceClient create(InvoiceServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final InvoiceServiceClient create(InvoiceServiceStub stub); final InvoiceServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") InvoiceServiceStub getStub(); final ListInvoicesResponse listInvoices(
      String customerId,
      String billingSetup,
      String issueYear,
      MonthOfYearEnum.MonthOfYear issueMonth); final ListInvoicesResponse listInvoices(ListInvoicesRequest request); final UnaryCallable<ListInvoicesRequest, ListInvoicesResponse> listInvoicesCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit); }
InvoiceServiceClient implements BackgroundResource { public final ListInvoicesResponse listInvoices( String customerId, String billingSetup, String issueYear, MonthOfYearEnum.MonthOfYear issueMonth) { ListInvoicesRequest request = ListInvoicesRequest.newBuilder() .setCustomerId(customerId) .setBillingSetup(billingSetup) .setIssueYear(issueYear) .setIssueMonth(issueMonth) .build(); return listInvoices(request); } protected  InvoiceServiceClient(InvoiceServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") protected  InvoiceServiceClient(InvoiceServiceStub stub); static final InvoiceServiceClient create(); static final InvoiceServiceClient create(InvoiceServiceSettings settings); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") static final InvoiceServiceClient create(InvoiceServiceStub stub); final InvoiceServiceSettings getSettings(); @BetaApi("A restructuring of stub classes is planned, so this may break in the future") InvoiceServiceStub getStub(); final ListInvoicesResponse listInvoices(
      String customerId,
      String billingSetup,
      String issueYear,
      MonthOfYearEnum.MonthOfYear issueMonth); final ListInvoicesResponse listInvoices(ListInvoicesRequest request); final UnaryCallable<ListInvoicesRequest, ListInvoicesResponse> listInvoicesCallable(); @Override final void close(); @Override void shutdown(); @Override boolean isShutdown(); @Override boolean isTerminated(); @Override void shutdownNow(); @Override boolean awaitTermination(long duration, TimeUnit unit);  }