### Question:
GetViewDefinitionGeneratorSybase extends GetViewDefinitionGenerator { @Override public Sql[] generateSql(GetViewDefinitionStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain) { try { String sql = "select text from syscomments where id = object_id('" + database.convertRequestedSchemaToSchema(statement.getSchemaName()) + "." + statement.getViewName() + "') order by colid"; return new Sql[]{ new UnparsedSql(sql) }; } catch (DatabaseException e) { throw new UnexpectedLiquibaseException(e); } }  @Override int getPriority(); @Override boolean supports(GetViewDefinitionStatement statement, Database database); @Override Sql[] generateSql(GetViewDefinitionStatement statement, Database database, SqlGeneratorChain sqlGeneratorChain);  }### Answer:
@Test public void testGenerateSqlForDefaultSchema() { GetViewDefinitionGeneratorSybase generator = new GetViewDefinitionGeneratorSybase(); GetViewDefinitionStatement statement = new GetViewDefinitionStatement(null, "view_name"); Sql[] sql = generator.generateSql(statement, new SybaseDatabase(), null); assertEquals(1, sql.length); assertEquals("select text from syscomments where id = object_id('dbo.view_name') order by colid", sql[0].toSql()); }
@Test public void testGenerateSqlForNamedSchema() { GetViewDefinitionGeneratorSybase generator = new GetViewDefinitionGeneratorSybase(); GetViewDefinitionStatement statement = new GetViewDefinitionStatement("owner", "view_name"); Sql[] sql = generator.generateSql(statement, new SybaseDatabase(), null); assertEquals(1, sql.length); assertEquals("select text from syscomments where id = object_id('owner.view_name') order by colid", sql[0].toSql()); }