### Question:
RunningTransformations { public Trans runTransformationFromFileSystem( String filename ) { try { System.out.println( "***************************************************************************************" ); System.out.println( "Attempting to run transformation " + filename + " from file system" ); System.out.println( "***************************************************************************************\n" ); TransMeta transMeta = new TransMeta( filename, (Repository) null ); System.out.println( "Attempting to read and set named parameters" ); String[] declaredParameters = transMeta.listParameters(); for ( int i = 0; i < declaredParameters.length; i++ ) { String parameterName = declaredParameters[i]; String description = transMeta.getParameterDescription( parameterName ); String defaultValue = transMeta.getParameterDefault( parameterName ); String parameterValue = RandomStringUtils.randomAlphanumeric( 10 ); String output = String.format( "Setting parameter %s to \"%s\" [description: \"%s\", default: \"%s\"]", parameterName, parameterValue, description, defaultValue ); System.out.println( output ); transMeta.setParameterValue( parameterName, parameterValue ); } Trans transformation = new Trans( transMeta ); transformation.setLogLevel( LogLevel.MINIMAL ); System.out.println( "\nStarting transformation" ); transformation.execute( new String[0] ); transformation.waitUntilFinished(); Result result = transformation.getResult(); String outcome = String.format( "\nTrans %s executed %s", filename, ( result.getNrErrors() == 0 ? "successfully" : "with " + result.getNrErrors() + " errors" ) ); System.out.println( outcome ); return transformation; } catch ( Exception e ) { e.printStackTrace(); return null; } }  static void main( String[] args ); Trans runTransformationFromFileSystem( String filename ); Trans runTransformationFromRepository( String repositoryName, String directory, String transName, String username, String password ); static RunningTransformations instance; }### Answer:
@Test public void testRunningTransformations() throws KettleException { RunningTransformations instance = new RunningTransformations(); Trans t = instance.runTransformationFromFileSystem( "etl/parameterized_transformation.ktr" ); assertEquals( "Finished", t.getStatus() ); assertEquals( 0, t.getResult().getNrErrors() ); }