refactored the mock method in spec helper and allowed the connection to timeout after 5 seconds