MyJDBCConnection { public static Connection getConnection() throws AdeException { if (needsRenewed() || (projectCon.get() == null)) { logger.info("Renewing (or initializing) database connection"); initConnection(false); } return projectCon.get(); } private  MyJDBCConnection(); static synchronized void setDbConnectionProperties(String connectionUrl,
            String dbUser, String dbPassword); static void initConnection(boolean create); static Connection getConnection(); static void close(); static synchronized void flagForRenewal(); static void setConnection(Connection conn);  }
@Test public void testGetConnectionInitializesNewConnection() throws Exception { Connection c1 = MyJDBCConnection.getConnection(); assertNotNull("Assert connection not null", c1); }