### Question:
JaxWsBatchJobResponseDeserializer { public <T> T deserializeBatchJobMutateResults(Class<T> clazz, URL url) throws Exception { return this.deserializeBatchJobMutateResults(clazz, url, 0, Integer.MAX_VALUE); } @Inject  JaxWsBatchJobResponseDeserializer(BatchJobHelperUtility batchJobHelperUtility); T deserializeBatchJobMutateResults(Class<T> clazz, URL url); T deserializeBatchJobMutateResults(
      Class<T> clazz, URL url, int startIndex, int numberResults);  }### Answer:
@Test public void testDeserializeBatchJobMutateResponseWithErrors() throws Exception { BatchJobMutateResponse response = deserializer.deserializeBatchJobMutateResults( BatchJobMutateResponse.class, JaxWsBatchJobResponseDeserializerTest.class.getResource( "resources/BatchJobMutate.responseWithErrors.xml")); assertNotNull("Null deserialized request returned", response); assertEquals(7, response.getMutateResults().length); assertNotNull(response.getMutateResults()[0].getOperand().getCampaign()); assertNotNull(response.getMutateResults()[1].getOperand().getAdGroup()); assertNotNull(response.getMutateResults()[2].getOperand().getAdGroupCriterion()); assertThat( response.getMutateResults()[2].getOperand().getAdGroupCriterion(), Matchers.instanceOf(BiddableAdGroupCriterion.class)); assertNotNull(response.getMutateResults()[3].getOperand().getAdGroupCriterion()); assertThat( response.getMutateResults()[3].getOperand().getAdGroupCriterion(), Matchers.instanceOf(BiddableAdGroupCriterion.class)); assertThat( response.getMutateResults()[4].getErrorList().getErrors()[0], Matchers.instanceOf(CriterionError.class)); assertThat( response.getMutateResults()[5].getErrorList().getErrors()[0], Matchers.instanceOf(CriterionError.class)); assertThat( response.getMutateResults()[6].getErrorList().getErrors()[0], Matchers.instanceOf(CriterionError.class)); }
@Test public void testDeserializeBatchJobResponseWithoutErrors() throws Exception { BatchJobMutateResponse response = deserializer.deserializeBatchJobMutateResults( BatchJobMutateResponse.class, JaxWsBatchJobResponseDeserializerTest.class.getResource( "resources/BatchJobMutate.responseWithoutErrors.xml")); assertNotNull(response); assertEquals(4, response.getMutateResults().length); assertNotNull(response.getMutateResults()[0].getOperand().getCampaign()); assertNotNull(response.getMutateResults()[1].getOperand().getAdGroup()); assertNotNull(response.getMutateResults()[2].getOperand().getAdGroupCriterion()); assertThat( response.getMutateResults()[3].getOperand().getAdGroupCriterion(), Matchers.instanceOf(BiddableAdGroupCriterion.class)); assertNotNull(response.getMutateResults()[3].getOperand().getAdGroupCriterion()); assertThat( response.getMutateResults()[3].getOperand().getAdGroupCriterion(), Matchers.instanceOf(BiddableAdGroupCriterion.class)); }