@Test(expected=IllegalStateException.class) public void testUnknown() throws IOException { connectionFactory.createConnection(ADDRESS1); }
public synchronized Connection createConnection(String address) { if (connectionFactory==null) { throw new IllegalStateException("Connection not expected. You have to call expectCall() or useConnectionFactory() first."); } return connectionFactory.createConnection(address); }
StaticConnectionFactory implements ConnectionFactory { public synchronized Connection createConnection(String address) { if (connectionFactory==null) { throw new IllegalStateException("Connection not expected. You have to call expectCall() or useConnectionFactory() first."); } return connectionFactory.createConnection(address); } }
StaticConnectionFactory implements ConnectionFactory { public synchronized Connection createConnection(String address) { if (connectionFactory==null) { throw new IllegalStateException("Connection not expected. You have to call expectCall() or useConnectionFactory() first."); } return connectionFactory.createConnection(address); }  }
StaticConnectionFactory implements ConnectionFactory { public synchronized Connection createConnection(String address) { if (connectionFactory==null) { throw new IllegalStateException("Connection not expected. You have to call expectCall() or useConnectionFactory() first."); } return connectionFactory.createConnection(address); }  synchronized Connection createConnection(String address); synchronized static UniversalMockRecorder expectCall(); synchronized static void reset(); static void useConnectionFactory(ConnectionFactory connectionFactory); synchronized static RequestRecorder getRequestRecorder(); }
StaticConnectionFactory implements ConnectionFactory { public synchronized Connection createConnection(String address) { if (connectionFactory==null) { throw new IllegalStateException("Connection not expected. You have to call expectCall() or useConnectionFactory() first."); } return connectionFactory.createConnection(address); }  synchronized Connection createConnection(String address); synchronized static UniversalMockRecorder expectCall(); synchronized static void reset(); static void useConnectionFactory(ConnectionFactory connectionFactory); synchronized static RequestRecorder getRequestRecorder();  }