public void safeStop() {
    if ( steps == null ) {
      return;
    }
    steps.stream()
      .filter( this::isInputStep )
      .forEach( combi -> stopStep( combi, true ) );

    notifyStoppedListeners();
  }
@Test
  public void testSafeStop() {
    StepInterface stepMock1 = mock( StepInterface.class );
    StepDataInterface stepDataMock1 = mock( StepDataInterface.class );
    StepMeta stepMetaMock1 = mock( StepMeta.class );

    when( stepMock1.getStepname() ).thenReturn( "stepName" );
    trans.setSteps( of( combi( stepMock1, stepDataMock1, stepMetaMock1 ) ) );

    // Scenario: step not stopped
    when( stepMock1.isSafeStopped() ).thenReturn( false );
    Result result = trans.getResult();
    assertFalse( result.isSafeStop() );

    // Scenario: step stopped
    when( stepMock1.isSafeStopped() ).thenReturn( true );
    result = trans.getResult();
    assertTrue( result.isSafeStop() );
  }