DefaultDeleteBuilder extends BaseTaskBuilder implements DeleteBuilder<T> { @Override public DeleteTask<T> task() throws IllegalStateException { if (extractorName == null) { throw new IllegalStateException("Required 'sourceMatchExtractor' is not set"); } return new DeleteTask<T>(extractorName, batchSize, type, targetFilter, targetCayenneService, tokenManager, createProcessor()); } DefaultDeleteBuilder(
            Class<T> type,
            ITargetCayenneService targetCayenneService,
            ITokenManager tokenManager,
            ITaskService taskService,
            MapperBuilder mapperBuilder); @Override DefaultDeleteBuilder<T> stageListener(Object listener); @Override DefaultDeleteBuilder<T> batchSize(int batchSize); @Override DefaultDeleteBuilder<T> targetFilter(Expression targetFilter); @Override DefaultDeleteBuilder<T> sourceMatchExtractor(String extractorName); @Override DefaultDeleteBuilder<T> matchBy(Mapper mapper); @Override DefaultDeleteBuilder<T> matchBy(String... keyAttributes); @Override DefaultDeleteBuilder<T> matchBy(Property<?>... matchAttributes); @Override DefaultDeleteBuilder<T> matchById(); @Override DeleteTask<T> task();  }
@Test public void testTask_NoExtractorName() { assertThrows(IllegalStateException.class, () -> builder.task()); }