Added JUnit test for connection request failure.