@Test void testAddQuery() { int batchSize = 2; for(int i=0; i<batchSize; i++) { String bid = "123" + i; String query = "Select * from Invoice " + i; batchOperation.addQuery(query, bid); Assert.assertNotNull(batchOperation.getBIds()); Assert.assertNotNull(batchOperation.getBatchItemRequests()); Assert.assertEquals(batchOperation.getBIds().size(), i+1); Assert.assertEquals(batchOperation.getBatchItemRequests().size(), i+1); BatchItemRequest batchItemRequest = batchOperation.getBatchItemRequests().get(i); Assert.assertNotNull(batchItemRequest); Assert.assertEquals(batchItemRequest.getBId(), bid); Assert.assertNotNull(batchItemRequest.getQuery()); Assert.assertEquals(batchItemRequest.getQuery(), query); List<String> bids = batchOperation.getBIds(); Assert.assertNotNull(bids); Assert.assertEquals(bids.size(), i+1); } }
public void addQuery(String query, String bId) { BatchItemRequest batchItemRequest = new BatchItemRequest(); batchItemRequest.setBId(bId); batchItemRequest.setQuery(query); batchItemRequests.add(batchItemRequest); bIds.add(bId); }
BatchOperation { public void addQuery(String query, String bId) { BatchItemRequest batchItemRequest = new BatchItemRequest(); batchItemRequest.setBId(bId); batchItemRequest.setQuery(query); batchItemRequests.add(batchItemRequest); bIds.add(bId); } }
BatchOperation { public void addQuery(String query, String bId) { BatchItemRequest batchItemRequest = new BatchItemRequest(); batchItemRequest.setBId(bId); batchItemRequest.setQuery(query); batchItemRequests.add(batchItemRequest); bIds.add(bId); }  }
BatchOperation { public void addQuery(String query, String bId) { BatchItemRequest batchItemRequest = new BatchItemRequest(); batchItemRequest.setBId(bId); batchItemRequest.setQuery(query); batchItemRequests.add(batchItemRequest); bIds.add(bId); }  void addEntity(T entity, OperationEnum operation, String bId); void addQuery(String query, String bId); void addCDCQuery(List<? extends IEntity> entities, String changedSince, String bId); void addReportQuery(String reportQuery, String bId); List<BatchItemRequest> getBatchItemRequests(); List<String> getBIds(); boolean isFault(String bId); boolean isReport(String bId); boolean isQuery(String bId); boolean isCDCQuery(String bId); boolean isEntity(String bId); Fault getFault(String bId); Report getReport(String bId); QueryResult getQueryResponse(String bId); CDCQueryResult getCDCQueryResult(String bId); IEntity getEntity(String bId); Map<String, Fault> getFaultResult(); Map<String, Report> getReportResult(); Map<String, QueryResult> getQueryResult(); Map<String, CDCQueryResult> getCDCQueryResult(); Map<String, IEntity> getEntityResult(); }
BatchOperation { public void addQuery(String query, String bId) { BatchItemRequest batchItemRequest = new BatchItemRequest(); batchItemRequest.setBId(bId); batchItemRequest.setQuery(query); batchItemRequests.add(batchItemRequest); bIds.add(bId); }  void addEntity(T entity, OperationEnum operation, String bId); void addQuery(String query, String bId); void addCDCQuery(List<? extends IEntity> entities, String changedSince, String bId); void addReportQuery(String reportQuery, String bId); List<BatchItemRequest> getBatchItemRequests(); List<String> getBIds(); boolean isFault(String bId); boolean isReport(String bId); boolean isQuery(String bId); boolean isCDCQuery(String bId); boolean isEntity(String bId); Fault getFault(String bId); Report getReport(String bId); QueryResult getQueryResponse(String bId); CDCQueryResult getCDCQueryResult(String bId); IEntity getEntity(String bId); Map<String, Fault> getFaultResult(); Map<String, Report> getReportResult(); Map<String, QueryResult> getQueryResult(); Map<String, CDCQueryResult> getCDCQueryResult(); Map<String, IEntity> getEntityResult();  }