### Question:
TransformationRuntimeExtensionPoint extends BaseRuntimeExtensionPoint implements TransListener { @Override public void transFinished( final Trans trans ) throws KettleException { if ( trans == null ) { return; } if ( trans.isPreview() ) { return; } log.warn( Messages.getString( "INFO.TransformationAnalyzeStarting", trans.getName() ) ); logMinimal( Messages.getString( "INFO.TransformationAnalyzeStarting", trans.getName() ) ); if ( shouldCreateGraph( trans ) ) { runAnalyzers( trans ); } if ( allowedAsync() ) { createLineGraphAsync( trans ); } else { createLineGraph( trans ); } }  @Override void callExtensionPoint( LogChannelInterface logChannelInterface, Object o ); @Override void transStarted( Trans trans ); @Override void transActive( Trans trans ); @Override void transFinished( final Trans trans );  }### Answer:
@Test public void testTransFinished() throws Exception { TransformationRuntimeExtensionPoint ext = spy( transExtensionPoint ); ext.transFinished( null ); verify( ext, never() ).populateExecutionProfile( Mockito.any( IExecutionProfile.class ), eq( trans ) ); ext.transFinished( trans ); verify( ext, times( 1 ) ).populateExecutionProfile( Mockito.any( IExecutionProfile.class ), eq( trans ) ); verify( ext, times( 1 ) ).runAnalyzers( eq( trans ) ); verify( ext, times( 2 ) ).shouldCreateGraph( eq( trans ) ); verify( lineageWriter, times( 1 ) ).outputLineageGraph( Matchers.any( LineageHolder.class ) ); Trans mockTrans = spy( trans ); Result result = mock( Result.class ); when( mockTrans.getResult() ).thenReturn( result ); ext.transFinished( mockTrans ); verify( ext, times( 1 ) ).populateExecutionProfile( Mockito.any( IExecutionProfile.class ), eq( mockTrans ) ); }