### Question:
VirtualSQLDataSource implements javax.sql.DataSource { protected static boolean includeCurrentSchema(Connection conn, String schema) { try { String connectionURL = conn.getMetaData().getURL().toLowerCase(); if (connectionURL.startsWith("jdbc:cassandra")) { int index = connectionURL.indexOf(";"); if (index > 0 && index < connectionURL.length()) { String paramString = connectionURL.substring(index + 1); Properties p = new Properties(); p.load(new StringReader(paramString.replaceAll(";", "\n"))); String selectedSchema = p.getProperty("defaultkeyspace"); return (schema.equals(selectedSchema)); } } } catch (Exception ex) {}; return true; } VirtualSQLDataSource(ConnectionFactory connectionFactory); Connection getConnection(); Connection getConnection(String username, String password); Set<String> getSchemas(); Set<String> getCatalogs(); Set<String> getSubDSTableList(String catalog, String schemaPattern, String tableNamePattern, String[] types); boolean testIndividualConnections(); String getDatabaseProductName(); String getIdentifierQuoteString(); PrintWriter getLogWriter(); int getLoginTimeout(); void setLogWriter(PrintWriter out); void setLoginTimeout(int seconds); java.util.logging.Logger getParentLogger(); T unwrap(java.lang.Class<T> iface); boolean isWrapperFor(java.lang.Class<?> iface); static Set<String> discoverSchemas(Connection conn); static Set<String> discoverNonEmptySchemas(Connection conn, Set<String> databaseObjectTypesFilter); static Set discoverCatalogs(Connection conn);  }### Answer:
@Test public void includeCurrentSchema() { Assert.assertEquals(VirtualSQLDataSource.includeCurrentSchema(connection, "ABC"), false); Assert.assertEquals(VirtualSQLDataSource.includeCurrentSchema(connection, "store"), true); }