@Test public void testApplyTransformListenerException() { final AtomicInteger failureBatchCount = new AtomicInteger(); testListenerException( new ApplyTransformListener() .withTransform(new ServerTransform("thisTransformDoesntExist")) .onBatchFailure( (batch, throwable) -> failureBatchCount.incrementAndGet() ) ); // there should be one failure sent to the ApplyTransformListener // onBatchFailure listener since the transform is invalid assertEquals(1, failureBatchCount.get()); }
.onBatchFailure((batch, throwable) -> throwable.printStackTrace())
.withApplyResult(ApplyResult.REPLACE) .onSuccess(batch -> count2.addAndGet(batch.getItems().length)) .onBatchFailure((batch, throwable) -> throwable.printStackTrace()); QueryBatcher batcher = moveMgr.newQueryBatcher(query2) .onUrisReady(listener)