exceptionfactory commented on code in PR #7752:
URL: https://github.com/apache/nifi/pull/7752#discussion_r1332238633


##########
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/java/org/apache/nifi/lookup/script/TestScriptedLookupService.java:
##########
@@ -0,0 +1,140 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.lookup.script;
+
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processors.script.AccessibleScriptingComponentHelper;
+import org.apache.nifi.script.ScriptingComponentHelper;
+import org.apache.nifi.script.ScriptingComponentUtils;
+import org.apache.nifi.util.TestRunner;
+import org.apache.nifi.util.TestRunners;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Optional;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+
+/**
+ * Unit tests for the ScriptedLookupService controller service
+ */
+public class TestScriptedLookupService {
+    @TempDir
+    private static Path targetPath;
+    @TempDir
+    private static Path alternateTargetPath;
+    private ScriptedLookupService scriptedLookupService;
+    private TestRunner runner;
+
+    @BeforeAll
+    public static void setUpOnce() throws Exception {
+        
Files.copy(Paths.get("src/test/resources/groovy/test_lookup_inline.groovy"), 
targetPath, StandardCopyOption.REPLACE_EXISTING);
+        
Files.copy(Paths.get("src/test/resources/groovy/test_simple_lookup_inline.groovy"),
 alternateTargetPath, StandardCopyOption.REPLACE_EXISTING);
+    }
+
+    @BeforeEach
+    public void setUp() throws Exception {
+        scriptedLookupService = new MockScriptedLookupService();
+        runner = TestRunners.newTestRunner(new AbstractProcessor() {
+            @Override
+            public void onTrigger(final ProcessContext context, final 
ProcessSession session) throws ProcessException {
+            }
+        });

Review Comment:
   This can be changed to NoOpProcessor.class:
   ```suggestion
           runner = TestRunners.newTestRunner(NoOpProcessor.class);
   ```



##########
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/java/org/apache/nifi/lookup/script/TestSimpleScriptedLookupService.java:
##########
@@ -0,0 +1,93 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.lookup.script;
+
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processors.script.AccessibleScriptingComponentHelper;
+import org.apache.nifi.script.ScriptingComponentHelper;
+import org.apache.nifi.script.ScriptingComponentUtils;
+import org.apache.nifi.util.TestRunner;
+import org.apache.nifi.util.TestRunners;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.Optional;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertFalse;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+/**
+ * Unit tests for the SimpleScriptedLookupService controller service
+ */
+public class TestSimpleScriptedLookupService {
+    @TempDir
+    private static Path targetPath;
+
+    @BeforeAll
+    public static void setUpOnce() throws Exception {
+        
Files.copy(Paths.get("src/test/resources/groovy/test_lookup_inline.groovy"), 
targetPath, StandardCopyOption.REPLACE_EXISTING);
+    }
+
+    @Test
+    void testSimpleLookupServiceGroovyScript() throws Exception {
+        final TestRunner runner = TestRunners.newTestRunner(new 
AbstractProcessor() {
+            @Override
+            public void onTrigger(final ProcessContext context, final 
ProcessSession session) throws ProcessException {
+            }
+        });

Review Comment:
   ```suggestion
           runner = TestRunners.newTestRunner(NoOpProcessor.class);
   ```



##########
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/java/org/apache/nifi/record/script/ScriptedRecordSetWriterTest.java:
##########
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.record.script;
+
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processors.script.AccessibleScriptingComponentHelper;
+import org.apache.nifi.script.ScriptingComponentHelper;
+import org.apache.nifi.script.ScriptingComponentUtils;
+import org.apache.nifi.serialization.RecordSetWriter;
+import org.apache.nifi.serialization.SimpleRecordSchema;
+import org.apache.nifi.serialization.record.MapRecord;
+import org.apache.nifi.serialization.record.RecordField;
+import org.apache.nifi.serialization.record.RecordFieldType;
+import org.apache.nifi.serialization.record.RecordSchema;
+import org.apache.nifi.serialization.record.RecordSet;
+import org.apache.nifi.util.MockComponentLog;
+import org.apache.nifi.util.TestRunner;
+import org.apache.nifi.util.TestRunners;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+import org.w3c.dom.Document;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathFactory;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+/**
+ * Unit tests for the ScriptedReader class
+ */
+public class ScriptedRecordSetWriterTest {
+    @TempDir
+    private static Path targetPath;
+
+    @BeforeAll
+    public static void setUpOnce() throws Exception {
+        
Files.copy(Paths.get("src/test/resources/groovy/test_record_writer_inline.groovy"),
 targetPath, StandardCopyOption.REPLACE_EXISTING);
+    }
+
+    @Test
+    void testRecordWriterGroovyScript() throws Exception {
+        final TestRunner runner = TestRunners.newTestRunner(new 
AbstractProcessor() {
+            @Override
+            public void onTrigger(final ProcessContext context, final 
ProcessSession session) throws ProcessException {
+            }
+        });
+
+        MockScriptedWriter recordSetWriterFactory = new MockScriptedWriter();
+        runner.addControllerService("writer", recordSetWriterFactory);
+        runner.setProperty(recordSetWriterFactory, "Script Engine", "Groovy");
+        runner.setProperty(recordSetWriterFactory, 
ScriptingComponentUtils.SCRIPT_FILE, targetPath.toString());
+        runner.setProperty(recordSetWriterFactory, 
ScriptingComponentUtils.SCRIPT_BODY, (String) null);
+        runner.setProperty(recordSetWriterFactory, 
ScriptingComponentUtils.MODULES, (String) null);
+        runner.enableControllerService(recordSetWriterFactory);
+
+        RecordSchema schema = 
recordSetWriterFactory.getSchema(Collections.emptyMap(), null);
+        ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+        RecordSetWriter recordSetWriter = 
recordSetWriterFactory.createWriter(new MockComponentLog("id", 
recordSetWriterFactory), schema, outputStream, Collections.emptyMap());
+        assertNotNull(recordSetWriter);
+
+        SimpleRecordSchema recordSchema = new 
SimpleRecordSchema(Arrays.asList(new RecordField("id", 
RecordFieldType.INT.getDataType()),
+                new RecordField("name", RecordFieldType.STRING.getDataType()),
+                new RecordField("code", RecordFieldType.INT.getDataType())));
+        MapRecord [] records = createMapRecords(recordSchema);
+
+        recordSetWriter.write(RecordSet.of(recordSchema, records));
+
+        DocumentBuilder documentBuilder = 
DocumentBuilderFactory.newInstance().newDocumentBuilder();
+        Document document = documentBuilder.parse(new 
ByteArrayInputStream(outputStream.toByteArray()));
+        XPathFactory xpathfactory = XPathFactory.newInstance();
+        XPath xpath = xpathfactory.newXPath();
+        assertEquals("1", xpath.evaluate("//record[1]/id/text()", document));
+        assertEquals("200", xpath.evaluate("//record[2]/code/text()", 
document));
+        assertEquals("Ramon", xpath.evaluate("//record[3]/name/text()", 
document));
+    }
+
+    private static MapRecord[] createMapRecords(SimpleRecordSchema 
recordSchema) {
+        Map<String, Object> map = new LinkedHashMap<>(3);
+        map.put("id", 1);
+        map.put("name", "John");
+        map.put("code", 100);
+        Map<String, Object> map1 = new LinkedHashMap<>(3);
+        map1.put("id", 2);
+        map1.put("name", "Mary");
+        map1.put("code", 200);
+        Map<String, Object> map2 = new LinkedHashMap<>(3);
+        map2.put("id", 3);
+        map2.put("name", "Ramon");
+        map2.put("code", 300);
+
+        return  new MapRecord[]{new MapRecord(recordSchema, map), new 
MapRecord(recordSchema, map1), new MapRecord(recordSchema, map2)};

Review Comment:
   ```suggestion
           return new MapRecord[]{new MapRecord(recordSchema, map), new 
MapRecord(recordSchema, map1), new MapRecord(recordSchema, map2)};
   ```



##########
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/java/org/apache/nifi/record/script/ScriptedRecordSetWriterTest.java:
##########
@@ -0,0 +1,130 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.record.script;
+
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processors.script.AccessibleScriptingComponentHelper;
+import org.apache.nifi.script.ScriptingComponentHelper;
+import org.apache.nifi.script.ScriptingComponentUtils;
+import org.apache.nifi.serialization.RecordSetWriter;
+import org.apache.nifi.serialization.SimpleRecordSchema;
+import org.apache.nifi.serialization.record.MapRecord;
+import org.apache.nifi.serialization.record.RecordField;
+import org.apache.nifi.serialization.record.RecordFieldType;
+import org.apache.nifi.serialization.record.RecordSchema;
+import org.apache.nifi.serialization.record.RecordSet;
+import org.apache.nifi.util.MockComponentLog;
+import org.apache.nifi.util.TestRunner;
+import org.apache.nifi.util.TestRunners;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+import org.w3c.dom.Document;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+import javax.xml.xpath.XPath;
+import javax.xml.xpath.XPathFactory;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+
+/**
+ * Unit tests for the ScriptedReader class
+ */
+public class ScriptedRecordSetWriterTest {
+    @TempDir
+    private static Path targetPath;
+
+    @BeforeAll
+    public static void setUpOnce() throws Exception {
+        
Files.copy(Paths.get("src/test/resources/groovy/test_record_writer_inline.groovy"),
 targetPath, StandardCopyOption.REPLACE_EXISTING);
+    }
+
+    @Test
+    void testRecordWriterGroovyScript() throws Exception {
+        final TestRunner runner = TestRunners.newTestRunner(new 
AbstractProcessor() {
+            @Override
+            public void onTrigger(final ProcessContext context, final 
ProcessSession session) throws ProcessException {
+            }
+        });

Review Comment:
   ```suggestion
           runner = TestRunners.newTestRunner(NoOpProcessor.class);
   ```



##########
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/java/org/apache/nifi/reporting/script/ScriptedReportingTaskTest.java:
##########
@@ -0,0 +1,165 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.reporting.script;
+
+import org.apache.nifi.components.PropertyDescriptor;
+import org.apache.nifi.controller.ConfigurationContext;
+import org.apache.nifi.logging.ComponentLog;
+import org.apache.nifi.processors.script.AccessibleScriptingComponentHelper;
+import org.apache.nifi.processors.script.ScriptRunner;
+import org.apache.nifi.provenance.ProvenanceEventRecord;
+import org.apache.nifi.registry.VariableRegistry;
+import org.apache.nifi.reporting.ReportingInitializationContext;
+import org.apache.nifi.script.ScriptingComponentHelper;
+import org.apache.nifi.script.ScriptingComponentUtils;
+import org.apache.nifi.util.MockConfigurationContext;
+import org.apache.nifi.util.MockEventAccess;
+import org.apache.nifi.util.MockReportingContext;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.extension.ExtendWith;
+import org.junit.jupiter.api.io.TempDir;
+import org.mockito.Mock;
+import org.mockito.junit.jupiter.MockitoExtension;
+
+import javax.script.ScriptEngine;
+import java.math.BigInteger;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.HashMap;
+import java.util.LinkedHashMap;
+import java.util.Map;
+import java.util.UUID;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertTrue;
+import static org.mockito.Mockito.doReturn;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.when;
+
+/**
+ * Unit tests for ScriptedReportingTask.
+ */
+@ExtendWith(MockitoExtension.class)
+class ScriptedReportingTaskTest {
+    private static final String SCRIPT_ENGINE = "Script Engine";
+    private static final PropertyDescriptor SCRIPT_ENGINE_PROPERTY_DESCRIPTOR 
= new PropertyDescriptor.Builder().name(SCRIPT_ENGINE).build();
+    private static final String GROOVY = "Groovy";
+    @TempDir
+    private Path targetPath;
+    @Mock
+    private ReportingInitializationContext initContext;
+    private MockScriptedReportingTask task;
+    private Map<PropertyDescriptor, String> properties;
+    private ConfigurationContext configurationContext;
+    private MockReportingContext reportingContext;
+
+    @BeforeEach
+    public void setUp(@Mock ComponentLog logger) {
+        task = new MockScriptedReportingTask();
+        properties = new HashMap<>();
+        configurationContext = new MockConfigurationContext(properties, null);
+        reportingContext = new MockReportingContext(new LinkedHashMap<>(), 
null, VariableRegistry.EMPTY_REGISTRY);
+        
when(initContext.getIdentifier()).thenReturn(UUID.randomUUID().toString());
+        when(initContext.getLogger()).thenReturn(logger);
+    }
+
+    @Test
+    void testProvenanceGroovyScript() throws Exception {
+        properties.put(SCRIPT_ENGINE_PROPERTY_DESCRIPTOR, GROOVY);
+        
Files.copy(Paths.get("src/test/resources/groovy/test_log_provenance_events.groovy"),
 targetPath, StandardCopyOption.REPLACE_EXISTING);
+        properties.put(ScriptingComponentUtils.SCRIPT_FILE, 
targetPath.toString());
+        reportingContext.setProperty(SCRIPT_ENGINE, GROOVY);
+        
reportingContext.setProperty(ScriptingComponentUtils.SCRIPT_FILE.getName(), 
targetPath.toString());
+
+        final MockEventAccess eventAccess = reportingContext.getEventAccess();
+        for(long index = 1; index < 4; index++) {

Review Comment:
   ```suggestion
           for (long index = 1; index < 4; index++) {
   ```



##########
nifi-nar-bundles/nifi-scripting-bundle/nifi-scripting-processors/src/test/java/org/apache/nifi/record/script/ScriptedReaderTest.java:
##########
@@ -0,0 +1,157 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.nifi.record.script;
+
+import org.apache.nifi.processor.AbstractProcessor;
+import org.apache.nifi.processor.ProcessContext;
+import org.apache.nifi.processor.ProcessSession;
+import org.apache.nifi.processor.exception.ProcessException;
+import org.apache.nifi.processors.script.AccessibleScriptingComponentHelper;
+import org.apache.nifi.script.ScriptingComponentHelper;
+import org.apache.nifi.script.ScriptingComponentUtils;
+import org.apache.nifi.serialization.RecordReader;
+import org.apache.nifi.serialization.record.Record;
+import org.apache.nifi.util.MockComponentLog;
+import org.apache.nifi.util.TestRunner;
+import org.apache.nifi.util.TestRunners;
+import org.junit.jupiter.api.AfterAll;
+import org.junit.jupiter.api.BeforeAll;
+import org.junit.jupiter.api.BeforeEach;
+import org.junit.jupiter.api.Test;
+import org.junit.jupiter.api.io.TempDir;
+
+import java.io.ByteArrayInputStream;
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.nio.file.Files;
+import java.nio.file.Path;
+import java.nio.file.Paths;
+import java.nio.file.StandardCopyOption;
+import java.util.Collections;
+import java.util.LinkedHashMap;
+import java.util.Map;
+
+import static org.junit.jupiter.api.Assertions.assertEquals;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
+import static org.junit.jupiter.api.Assertions.assertNull;
+import static org.junit.jupiter.api.Assertions.assertThrows;
+
+/**
+ * Unit tests for the ScriptedReader class
+ */
+class ScriptedReaderTest {
+    private static final String SOURCE_DIR = "src/test/resources";
+    private static final String GROOVY_DIR = "groovy";
+    private static Path tempJar;
+    @TempDir
+    private Path targetScriptFile;
+    private ScriptedReader recordReaderFactory;
+    private TestRunner runner;
+
+    @BeforeAll
+    public static void before() throws IOException {
+        tempJar = File.createTempFile("test-jar", null).toPath();
+    }
+
+    @AfterAll
+    public static void after() {
+        tempJar.toFile().delete();
+    }
+
+    @BeforeEach
+    public void setUp() throws Exception {
+        recordReaderFactory = new MockScriptedReader();
+        runner = TestRunners.newTestRunner(new AbstractProcessor() {
+            @Override
+            public void onTrigger(final ProcessContext context, final 
ProcessSession session) throws ProcessException {
+            }
+        });

Review Comment:
   ```suggestion
           runner = TestRunners.newTestRunner(NoOpProcessor.class);
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to