### Question:
DatabaseObjectInfo implements IDatabaseObjectInfo, Serializable { public String getQualifiedName() { return _qualifiedName; } DatabaseObjectInfo(String catalog, String schema, String simpleName,
                             DatabaseObjectType dboType, ISQLDatabaseMetaData md);  DatabaseObjectInfo(String catalog, String schema, String simpleName); String toString(); String getCatalogName(); String getSchemaName(); String getSimpleName(); String getQualifiedName(); DatabaseObjectType getDatabaseObjectType(); boolean equals(Object obj); int hashCode(); int compareTo(IDatabaseObjectInfo o); void replaceDatabaseObjectTypeConstantObjectsByConstantObjectsOfThisVM(DatabaseObjectType type);  }### Answer:
@Test public final void testGetQualifiedNameH2() throws Exception { String tableName = "foo\"\"bar"; dboInfoUnderTest = new DatabaseObjectInfo(testCatalog, testSchema, tableName, DatabaseObjectType.TABLE, h2SQLDatabaseMetaData); String identifierQuoteString = h2SQLDatabaseMetaData.getIdentifierQuoteString(); String sep = h2SQLDatabaseMetaData.getCatalogSeparator(); String expectedQualifiedName = identifierQuoteString + testSchema + identifierQuoteString + sep + identifierQuoteString + "foo\"\"\"\"bar" + identifierQuoteString; String qn = dboInfoUnderTest.getQualifiedName(); assertEquals(expectedQualifiedName, qn); }
@Test public final void testGetQualifiedNameSybase12() throws Exception { String tableName = "mytable"; final ISQLDatabaseMetaData md = sybase12SQLDatabaseMeta; assertEquals("Adaptive Server Enterprise", md.getDatabaseProductName()); dboInfoUnderTest = new DatabaseObjectInfo(testCatalog, testSchema, tableName, DatabaseObjectType.TABLE, md); String identifierQuoteString = md.getIdentifierQuoteString(); assertEquals("\"", identifierQuoteString); String sep = md.getCatalogSeparator(); String expected = testCatalog + sep + testSchema + sep + tableName; String actual = dboInfoUnderTest.getQualifiedName(); assertEquals(expected, actual); }
@Test public final void testGetQualifiedNameSybase15() throws Exception { String tableName = "mytable"; final ISQLDatabaseMetaData md = sybase15SQLDatabaseMeta; assertEquals("Adaptive Server Enterprise", md.getDatabaseProductName()); dboInfoUnderTest = new DatabaseObjectInfo(testCatalog, testSchema, tableName, DatabaseObjectType.TABLE, md); String identifierQuoteString = md.getIdentifierQuoteString(); assertEquals("\"", identifierQuoteString); String sep = md.getCatalogSeparator(); String expected = identifierQuoteString + testCatalog + identifierQuoteString + sep + identifierQuoteString + testSchema + identifierQuoteString + sep + identifierQuoteString + tableName + identifierQuoteString; String actual = dboInfoUnderTest.getQualifiedName(); assertEquals(expected, actual); }