@Test public void testConnection_BadPassword() throws Exception { FailoverConfig cfg = createFailoverConfig(); cfg.setPassword("ALTPW:abcdef"); FailoverConnection c = new FailoverConnection(cfg); try { Connection con = c.getConnection(); fail("Shouldn't be able to decrypt password"); } catch (SQLException expected) { } }
public synchronized Connection getConnection() throws SQLException { validateConnection(); return sqlConnection; }
FailoverConnection { public synchronized Connection getConnection() throws SQLException { validateConnection(); return sqlConnection; } }
FailoverConnection { public synchronized Connection getConnection() throws SQLException { validateConnection(); return sqlConnection; } private  FailoverConnection();  FailoverConnection(FailoverConfig config); }
FailoverConnection { public synchronized Connection getConnection() throws SQLException { validateConnection(); return sqlConnection; } private  FailoverConnection();  FailoverConnection(FailoverConfig config); FailoverConfig getConfig(); void setConfig(FailoverConfig config); void close(); synchronized Connection getConnection(); boolean isDebugMode(); }
FailoverConnection { public synchronized Connection getConnection() throws SQLException { validateConnection(); return sqlConnection; } private  FailoverConnection();  FailoverConnection(FailoverConfig config); FailoverConfig getConfig(); void setConfig(FailoverConfig config); void close(); synchronized Connection getConnection(); boolean isDebugMode();  }