// Path: src/main/java/com/github/cassandra/jdbc/CassandraConfiguration.java
// public static final String KEY_PASSWORD = "password";
// 
// Path: src/main/java/com/github/cassandra/jdbc/CassandraConfiguration.java
// public static final String KEY_USERNAME = "user";


import static org.testng.Assert.*;
import org.pmw.tinylog.Logger;
import org.testng.annotations.Test;
import java.sql.Connection;
import java.sql.DriverPropertyInfo;
import java.sql.ResultSet;
import java.util.Properties;
import static com.github.cassandra.jdbc.CassandraConfiguration.KEY_PASSWORD;
import static com.github.cassandra.jdbc.CassandraConfiguration.KEY_USERNAME;
            url = "jdbc:mysql:....";
            assertFalse(driver.acceptsURL(url));
            url = "jdbc:c*:datastax://host1,host2/keyspace1?key=value";
            assertTrue(driver.acceptsURL(url));
        } catch (Exception e) {
            e.printStackTrace();
            fail("Exception happened during test: " + e.getMessage());
        }
    }

    @Test(groups = {"unit", "server"})
    public void testConnect() {
        CassandraDriver driver = new CassandraDriver();

        try {
            CassandraConfiguration config = CassandraConfiguration.DEFAULT;
            Properties props = new Properties();
            props.setProperty(KEY_USERNAME, config.getUserName());
            props.setProperty(KEY_PASSWORD, config.getPassword());

            Connection conn = driver.connect(config.getConnectionUrl(), props);
            assertTrue(conn instanceof BaseCassandraConnection);
            assertTrue(conn.getClass().getName()
                    .endsWith("datastax.CassandraConnection"));

            conn.setSchema("system");
            ResultSet rs = conn.createStatement().executeQuery(
                    "select * from peers limit 5");
            while (rs.next()) {
                Logger.debug("{}\n=====", rs.getRow());
// Path: src/main/java/com/github/cassandra/jdbc/CassandraConfiguration.java
// public static final String KEY_PASSWORD = "password";
// 
// Path: src/main/java/com/github/cassandra/jdbc/CassandraConfiguration.java
// public static final String KEY_USERNAME = "user";


// Path: src/test/java/com/github/cassandra/jdbc/CassandraDriverTest.java
import static org.testng.Assert.*;
import org.pmw.tinylog.Logger;
import org.testng.annotations.Test;
import java.sql.Connection;
import java.sql.DriverPropertyInfo;
import java.sql.ResultSet;
import java.util.Properties;
import static com.github.cassandra.jdbc.CassandraConfiguration.KEY_PASSWORD;
import static com.github.cassandra.jdbc.CassandraConfiguration.KEY_USERNAME;

            url = "jdbc:mysql:....";
            assertFalse(driver.acceptsURL(url));
            url = "jdbc:c*:datastax://host1,host2/keyspace1?key=value";
            assertTrue(driver.acceptsURL(url));
        } catch (Exception e) {
            e.printStackTrace();
            fail("Exception happened during test: " + e.getMessage());
        }
    }

    @Test(groups = {"unit", "server"})
    public void testConnect() {
        CassandraDriver driver = new CassandraDriver();

        try {
            CassandraConfiguration config = CassandraConfiguration.DEFAULT;
            Properties props = new Properties();
            props.setProperty(KEY_USERNAME, config.getUserName());
            props.setProperty(KEY_PASSWORD, config.getPassword());

            Connection conn = driver.connect(config.getConnectionUrl(), props);
            assertTrue(conn instanceof BaseCassandraConnection);
            assertTrue(conn.getClass().getName()
                    .endsWith("datastax.CassandraConnection"));

            conn.setSchema("system");
            ResultSet rs = conn.createStatement().executeQuery(
                    "select * from peers limit 5");
            while (rs.next()) {
                Logger.debug("{}\n=====", rs.getRow());
                for (int i = 1; i <= rs.getMetaData().getColumnCount(); i++) {