### Question:
TransWebSocketEngineAdapter extends Trans { @Override public void prepareExecution( String[] arguments ) throws KettleException { activateParameters(); transMeta.activateParameters(); transMeta.setInternalKettleVariables(); Map<String, Object> env = Arrays.stream( transMeta.listVariables() ) .collect( toMap( Function.identity(), transMeta::getVariable ) ); this.executionRequest = new ExecutionRequest( new HashMap<>(), env, transformation, new HashMap<>(), logLevel, getActingPrincipal( transMeta ) ); setSteps( opsToSteps() ); wireStatusToTransListeners(); subscribeToOpLogging(); subscribeToTransLogging(); setReadyToStart( true ); } TransWebSocketEngineAdapter( TransMeta transMeta, String host, String port, boolean ssl ); @Override void setLogLevel( org.pentaho.di.core.logging.LogLevel logLogLevel ); @Override void killAll(); @Override void stopAll(); @Override void prepareExecution( String[] arguments ); @Override void startThreads(); @Override void waitUntilFinished(); @Override int getErrors(); @Override Result getResult(); @Override RowProducer addRowProducer( String stepname, int copynr );  }### Answer:
@Test public void testOpsIncludeSubTrans() throws Exception { TransMeta transMeta = new TransMeta( getClass().getResource( "grid-to-subtrans.ktr" ).getPath() ); TransWebSocketEngineAdapter adapter = new TransWebSocketEngineAdapter( transMeta, "", "", false ); adapter.prepareExecution( new String[]{} ); List<StepMetaDataCombi> steps = adapter.getSteps(); steps.sort( Comparator.comparing( s -> s.stepname ) ); assertEquals( 2, steps.size() ); assertEquals( 0, steps.get( 0 ).step.subStatuses().size() ); assertEquals( 2, steps.get( 1 ).step.subStatuses().size() ); }