@@ -0,0 +1,1028 @@
+package org.darkphoenixs.pool;%0D%0A%0D%0Aimport org.junit.Test;%0D%0A%0D%0Apublic class ConnectionPoolTest %7B%0D%0A%0D%0A%0D%0A%09@Test%0D%0A%09public void test() throws Exception %7B%0D%0A%09%09%0D%0A%09%09ConnPool pool = new ConnPool();%0D%0A%09%09%0D%0A%09%09Conn conn = pool.getConnection();%0D%0A%09%09%0D%0A%09%09pool.returnConnection(conn);%0D%0A%09%09%0D%0A%09%09pool.invalidateConnection(conn);%0D%0A%09%7D%0D%0A%09%0D%0A%09private static class ConnPool implements ConnectionPool%3CConn%3E %7B%0D%0A%0D%0A%09%09/** serialVersionUID */%0D%0A%09%09private static final long serialVersionUID = 1L;%0D%0A%0D%0A%09%09@Override%0D%0A%09%09public Conn getConnection() %7B%0D%0A%09%09%09%0D%0A%09%09%09Conn conn = new Conn();%0D%0A%09%09%09%0D%0A%09%09%09conn.setId(123);%0D%0A%09%09%09%0D%0A%09%09%09return conn;%0D%0A%09%09%7D%0D%0A%09%09@Override%0D%0A%09%09public void returnConnection(Conn conn) %7B%0D%0A%09%09%09%0D%0A%09%09%09System.out.println(%22returnConnection %22 + conn.getId());%0D%0A%09%09%7D%0D%0A%0D%0A%09%09@Override%0D%0A%09%09public void invalidateConnection(Conn conn) %7B%0D%0A%09%09%09%0D%0A%09%09%09System.out.println(%22invalidateConnection %22 + conn.getId());%0D%0A%09%09%7D%0D%0A%09%09%0D%0A%09%7D%0D%0A%09%0D%0A%09private static class Conn %7B%0D%0A%0D%0A%09%09private int id;%0D%0A%0D%0A%09%09public int getId() %7B%0D%0A%09%09%09return id;%0D%0A%09%09%7D%0D%0A%0D%0A%09%09public void setId(int id) %7B%0D%0A%09%09%09this.id = id;%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%7D%0D%0A

add testcase