@Test
public void testOpenConnectionToH2DbHavingUsernameAndPasswordEncodedIntoConnectionUrl() throws ClassNotFoundException {

    // GIVEN
    final BasicDataSource ds = new BasicDataSource();
    ds.setDriverClassName(H2_DRIVER_CLASS_PROP_VALUE);
    ds.setUrl(H2_CONNECTION_URL_PROP_VALUE + ";USER=" + USERNAME_PROP_VALUE + ";PASSWORD=" + PASSWORD_PROP_VALUE);
    // WHEN
    connection = DatabaseConnectionFactory.openConnection(ds);
    // THEN
    assertThat(connection, notNullValue());
    assertThat(connection, instanceOf(H2Connection.class));
}