### Question:
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();  }### Answer:
@Test(expected=IllegalStateException.class) public void testUnknown() throws IOException { connectionFactory.createConnection(ADDRESS1); }