@@ -0,0 +1,894 @@
+package com.github.pgasync.impl;%0A%0Aimport com.github.pgasync.ConnectionPool;%0Aimport com.github.pgasync.SqlException;%0Aimport org.junit.Test;%0A%0Aimport java.util.concurrent.ArrayBlockingQueue;%0Aimport java.util.concurrent.BlockingQueue;%0Aimport java.util.concurrent.TimeUnit;%0A%0Aimport static com.github.pgasync.impl.DatabaseRule.createPoolBuilder;%0Aimport static org.junit.Assert.assertEquals;%0A%0Apublic class AuthenticationTest %7B%0A%0A    @Test%0A    public void shouldThrowExceptionOnInvalidCredentials() throws Exception %7B%0A        try (ConnectionPool pool = createPoolBuilder(1).password(%22_invalid_%22).build()) %7B%0A            BlockingQueue%3CThrowable%3E result = new ArrayBlockingQueue%3C%3E(1);%0A            pool.query(%22SELECT 1%22, System.out::println, result::add);%0A            SqlException sqle = (SqlException) result.poll(5, TimeUnit.SECONDS);%0A            assertEquals(%2228P01%22, sqle.getCode());%0A        %7D%0A    %7D%0A%0A%7D%0A

Add test for authentication failure