### Question:
GetTableNames extends BaseTransform<GetTableNamesMeta, GetTableNamesData> implements ITransform<GetTableNamesMeta, GetTableNamesData> { @VisibleForTesting void processIncludeView( Object[] outputRow ) { if ( meta.isIncludeView() ) { try { String[] viewNames = data.db.getViews( data.realSchemaName, meta.isAddSchemaInOut() ); String[] viewNamesWithoutSchema = data.db.getViews( data.realSchemaName, false ); String ObjectType = BaseMessages.getString( PKG, "GetTableNamesDialog.ObjectType.View" ); for ( int i = 0; i < viewNames.length && !isStopped(); i++ ) { Object[] outputRowView = outputRow.clone(); int outputIndex = data.totalpreviousfields; String viewName = viewNames[ i ]; String viewNameWithoutSchema = viewNamesWithoutSchema[ i ]; outputRowView[ outputIndex++ ] = viewName; if ( !Utils.isEmpty( data.realObjectTypeFieldName ) ) { outputRowView[ outputIndex++ ] = ObjectType; } if ( !Utils.isEmpty( data.realIsSystemObjectFieldName ) ) { outputRowView[ outputIndex++ ] = Boolean.valueOf( data.db.isSystemTable( viewNameWithoutSchema ) ); } if ( !Utils.isEmpty( data.realSqlCreationFieldName) ) { outputRowView[ outputIndex++ ] = null; } data.rownr++; putRow( data.outputRowMeta, outputRowView ); logInfo( outputRowView ); } } catch ( Exception e ) { } } } GetTableNames( TransformMeta transformMeta, GetTableNamesMeta meta, GetTableNamesData data, int copyNr, PipelineMeta pipelineMeta,
                        Pipeline pipeline ); boolean processRow(); boolean init(); void dispose();  }### Answer:
@Test public void processIncludeViewIncludesSchemaTest() throws HopException { prepareIncludeViewTest( true ); getTableNamesSpy.processIncludeView( new Object[] { "", "", "", "" } ); for ( String table : getTableNamesWithoutSchema() ) { verify( database ).isSystemTable( table ); } verify( database, times( 1 ) ).getViews( "schema", false ); verify( database, times( 1 ) ).getViews( "schema", true ); }
@Test public void processIncludeViewDontIncludeSchemaTest() throws HopException { prepareIncludeViewTest( false ); getTableNamesSpy.processIncludeView( new Object[] { "", "", "", "" } ); for ( String table : getTableNamesWithoutSchema() ) { verify( database ).isSystemTable( table ); } verify( database, times( 2 ) ).getViews( "schema", false ); verify( database, times( 0 ) ).getViews( "schema", true ); }