### Question:
DatabaseUtils { public static String getDatabaseIdentifierQuoteString(Connection conn) { String dbIdentifierQuoteString = EMPTY_STRING; if (conn == null) { logger.warn("Identifier quote string from database requested, but connection provided is null."); return dbIdentifierQuoteString; } try { dbIdentifierQuoteString = conn.getMetaData().getIdentifierQuoteString(); } catch (SQLException e) { logger.warn("Unable to get identifier quote string from database with connection {} [{}]", conn.toString(), e.getMessage()); } if (dbIdentifierQuoteString == null) { dbIdentifierQuoteString = EMPTY_STRING; } logger.debug("Identifier quote string: {}", dbIdentifierQuoteString); return dbIdentifierQuoteString; }  static String getDatabaseIdentifierQuoteString(Connection conn);  }### Answer:
@Test public void getDatabaseIdentifierQuoteStringTest_ReturnsActualIdentifier() throws SQLException { String quoteIdentifier = DatabaseUtils.getDatabaseIdentifierQuoteString(connection); assertEquals("Quote identifier (actual) not retrieved correctly", "|", quoteIdentifier); }
@Test public void getDatabaseIdentifierQuoteStringTest_ReturnsNullIdentifier() throws SQLException { String quoteIdentifier = DatabaseUtils.getDatabaseIdentifierQuoteString(connection2); assertEquals("Quote identifier (null) not retrieved correctly", "", quoteIdentifier); }
@Test public void getDatabaseIdentifierQuoteStringTest_NullConnection() throws SQLException { String quoteIdentifier = DatabaseUtils.getDatabaseIdentifierQuoteString(null); assertEquals("Quote identifier for null connection not retrieved correctly", "", quoteIdentifier); }