connection in test case incorrect