### Question:
LonelyProcessingStep extends AbstractStep<Void> { @Override public long receive( long ticket, Void nothing ) { new Thread( () -> { assertHealthy(); try { try { lastProcessingTimestamp = nanoTime(); process(); endOfUpstream(); } catch ( Throwable e ) { issuePanic( e ); } } catch ( Throwable e ) { if ( !isPanic() ) { issuePanic( e ); } else { throw e; } } } ).start(); return 0; } LonelyProcessingStep( StageControl control, String name, Configuration config,
            StatsProvider... additionalStatsProviders ); @Override long receive( long ticket, Void nothing );  }### Answer:
@Test( timeout = 10_000 ) public void issuePanicBeforeCompletionOnError() throws InterruptedException { List<Step<?>> stepsPipeline = new ArrayList<>(); FaultyLonelyProcessingStepTest faultyStep = new FaultyLonelyProcessingStepTest( stepsPipeline ); stepsPipeline.add( faultyStep ); faultyStep.receive( 1, null ); faultyStep.awaitCompleted(); assertTrue( faultyStep.endOfUpstreamCalled ); assertTrue( "On upstream end step should be already on panic in case of exception", faultyStep.isPanicOnEndUpstream() ); assertTrue( faultyStep.isPanic() ); assertFalse( faultyStep.stillWorking() ); assertTrue( faultyStep.isCompleted() ); }