### Question:
FetchElasticsearchHttp extends AbstractElasticsearchHttpProcessor { @Override public Set<Relationship> getRelationships() { return relationships; }  @Override Set<Relationship> getRelationships(); @Override final List<PropertyDescriptor> getSupportedPropertyDescriptors(); @OnScheduled void setup(ProcessContext context); @Override void onTrigger(final ProcessContext context, final ProcessSession session); static final Relationship REL_SUCCESS; static final Relationship REL_FAILURE; static final Relationship REL_RETRY; static final Relationship REL_NOT_FOUND; static final PropertyDescriptor DOC_ID; static final PropertyDescriptor INDEX; static final PropertyDescriptor TYPE; static final PropertyDescriptor FIELDS; }### Answer:
@Test public void testFetchElasticsearchOnTriggerWithServerFailNoIncomingFlowFile() throws IOException { FetchElasticsearchHttpTestProcessor processor = new FetchElasticsearchHttpTestProcessor(false); processor.setStatus(100, "Should fail"); runner = TestRunners.newTestRunner(processor); runner.setProperty(AbstractElasticsearchHttpProcessor.ES_URL, "http: runner.setProperty(FetchElasticsearchHttp.INDEX, "doc"); runner.setProperty(FetchElasticsearchHttp.TYPE, "status"); runner.setValidateExpressionUsage(true); runner.setProperty(FetchElasticsearchHttp.DOC_ID, "${doc_id}"); runner.setIncomingConnection(false); runner.run(1, true, true); processor.getRelationships().forEach(relationship -> runner.assertTransferCount(relationship, 0)); runner.assertTransferCount(FetchElasticsearchHttp.REL_FAILURE, 0); }
@Test public void testFetchElasticsearchOnTriggerWithServerFailNoIncomingFlowFile() throws IOException { FetchElasticsearchHttpTestProcessor processor = new FetchElasticsearchHttpTestProcessor(false); processor.setStatus(100, "Should fail"); runner = TestRunners.newTestRunner(processor); runner.setProperty(AbstractElasticsearchHttpProcessor.ES_URL, "http: runner.setProperty(FetchElasticsearchHttp.INDEX, "doc"); runner.setProperty(FetchElasticsearchHttp.TYPE, "status"); runner.setProperty(FetchElasticsearchHttp.DOC_ID, "${doc_id}"); runner.setIncomingConnection(false); runner.run(1, true, true); processor.getRelationships().forEach(relationship -> runner.assertTransferCount(relationship, 0)); runner.assertTransferCount(FetchElasticsearchHttp.REL_FAILURE, 0); }