### Question:
SpoonTransformationDelegate extends SpoonDelegate { boolean isLogTableDefined( TransLogTable logTable ) { return logTable.getDatabaseMeta() != null && !Utils.isEmpty( logTable.getTableName() ); } SpoonTransformationDelegate( Spoon spoon ); boolean addTransformation( TransMeta transMeta ); synchronized void closeTransformation( TransMeta transMeta ); Spoon getSpoon(); void addTransGraph( TransMeta transMeta ); void tabSelected( TabItem item ); List<TransMeta> getTransformationList(); TransMeta getTransformation( String name ); void removeTransformation( TransMeta transMeta ); TransMeta[] getLoadedTransformations(); TransGraph findTransGraphOfTransformation( TransMeta transMeta ); boolean isDefaultTransformationName( String name ); void undoTransformationAction( TransMeta transMeta, TransAction transAction ); void redoTransformationAction( TransMeta transMeta, TransAction transAction ); void executeTransformation( final TransMeta transMeta, final boolean local, final boolean remote,
      final boolean cluster, final boolean preview, final boolean debug, final Date replayDate, final boolean safe,
      LogLevel logLevel );  }### Answer:
@Test public void testIsLogTableDefinedLogTableDefined() { DatabaseMeta databaseMeta = mock( DatabaseMeta.class ); doReturn( databaseMeta ).when( transLogTable ).getDatabaseMeta(); doReturn( "test_table" ).when( transLogTable ).getTableName(); assertTrue( delegate.isLogTableDefined( transLogTable ) ); }
@Test public void testIsLogTableDefinedLogTableNotDefined() { DatabaseMeta databaseMeta = mock( DatabaseMeta.class ); doReturn( databaseMeta ).when( transLogTable ).getDatabaseMeta(); assertFalse( delegate.isLogTableDefined( transLogTable ) ); }