pcon = useuser ? (PooledConnection)AlternateUsernameTest.this.datasource.getConnection(username, password) :
(PooledConnection)AlternateUsernameTest.this.datasource.getConnection();
Connection con = (Connection)pcon.getConnection();
Assert.assertTrue("Username mismatch: Requested User:"+username+" Actual user:"+con.getUsername(), con.getUsername().equals(username));
Assert.assertTrue("Password mismatch: Requested Password:"+password+" Actual password:"+con.getPassword(), con.getPassword().equals(password));
}catch (SQLException x) {
test.failures++;
test.lastMessage = x.getMessage();
done = true;
x.printStackTrace();