SQLIdentifier implements Comparable<SQLIdentifier> { public String getName() { return isEscaped ? escapeStartChar + name + escapeEndChar : name; } SQLIdentifier( String identifier ); protected  SQLIdentifier( String table, String schema ); String getQualifier(); String getName(); boolean isEscaped(); @Override int hashCode(); @Override boolean equals( Object that ); @Override String toString(); @Override int compareTo( SQLIdentifier o );  }
@Test public void testGetNameWithEscapedColumnName() { String expected = "\"column\""; SQLIdentifier actual = new SQLIdentifier( expected ); Assert.assertEquals( expected, actual.getName() ); }
@Test public void testGetNameWithoutEscapedColumnName() { String expected = "column"; SQLIdentifier actual = new SQLIdentifier( expected ); Assert.assertEquals( expected, actual.getName() ); }
@Test public void testGetNameWithEscapedTableAndColumnName() { String identifier = "\"table.column\""; String expected = "\"column\""; SQLIdentifier actual = new SQLIdentifier( identifier ); Assert.assertEquals( expected, actual.getName() ); }
@Test public void testGetNameWithoutEscapedTableAndColumnName() { String identifier = "table.column"; String expected = "column"; SQLIdentifier actual = new SQLIdentifier( identifier ); Assert.assertEquals( expected, actual.getName() ); }