@Test public void shouldThrowsBadRequestOnList() { try { String responseAsString = "<?xml version=\"1.0\" encoding=\"ISO-8859-1\"?>" + "<errors>" + "<error>" + "<code>0001</code>" + "<message>Card brand is required.</message>" + "</error>" + "</errors>"; HttpResponse response = new HttpResponse(400, responseAsString); when(httpClient.execute(any(HttpMethod.class), anyString(), anyMap(), any(HttpRequestBody.class))).thenReturn(response); installmentsListResource.list(installmentRequest); } catch (PagSeguroBadRequestException e) { ServerErrors errors = e.getErrors(); ServerError error = errors.getErrors().iterator().next(); assertEquals(new Integer(0001), error.getCode()); assertEquals("Card brand is required.", error.getMessage()); } catch (Exception e) { } }
public DataList<? extends InstallmentDetail> list( Builder<InstallmentRequest> installmentListingBuilder) { return list(installmentListingBuilder.build()); }
InstallmentsListResource { public DataList<? extends InstallmentDetail> list( Builder<InstallmentRequest> installmentListingBuilder) { return list(installmentListingBuilder.build()); } }
InstallmentsListResource { public DataList<? extends InstallmentDetail> list( Builder<InstallmentRequest> installmentListingBuilder) { return list(installmentListingBuilder.build()); } InstallmentsListResource(PagSeguro pagSeguro, HttpClient httpClient); }
InstallmentsListResource { public DataList<? extends InstallmentDetail> list( Builder<InstallmentRequest> installmentListingBuilder) { return list(installmentListingBuilder.build()); } InstallmentsListResource(PagSeguro pagSeguro, HttpClient httpClient); DataList<? extends InstallmentDetail> list(
      Builder<InstallmentRequest> installmentListingBuilder); DataList<? extends InstallmentDetail> list(InstallmentRequest installmentRequest); }
InstallmentsListResource { public DataList<? extends InstallmentDetail> list( Builder<InstallmentRequest> installmentListingBuilder) { return list(installmentListingBuilder.build()); } InstallmentsListResource(PagSeguro pagSeguro, HttpClient httpClient); DataList<? extends InstallmentDetail> list(
      Builder<InstallmentRequest> installmentListingBuilder); DataList<? extends InstallmentDetail> list(InstallmentRequest installmentRequest);  }