### Question:
DefaultConnectionPool implements ConnectionPool { @Override public Connection getConnection(final String username, final String password, final URI serverAddress) { return librarian.checkOut(username, password, serverAddress); } DefaultConnectionPool(final ConnectionLibrarian<? extends Connection> librarian); static ConnectionPool getInstance(); @Override Connection getConnection(final String username, final String password, final URI serverAddress); @Override Connection getConnection(final String username, final String salt, final URI privateKeyLocation,
            final URI serverAddress);  }### Answer:
@Test public void testGetConnectionUsernamePassword() { final String username = "username"; final String password = "password"; final URI serverAddress = URI.create("some.server"); connectionPool.getConnection(username, password, serverAddress); verify(librarian).checkOut(username, password, serverAddress); }
@Test public void testGetConnectionUsernamePrivateKey() { final String username = "username"; final String salt = "salt"; final URI privateKeyLocation = URI.create("private.key"); final URI serverAddress = URI.create("remote.server"); connectionPool.getConnection(username, salt, privateKeyLocation, serverAddress); verify(librarian).checkOut(username, salt, privateKeyLocation, serverAddress); }