@Test public void testStatusCodeUnknown() throws Exception { mockWebServer.enqueue(new MockResponse().setResponseCode(9650456).setBody("yay!")); SimpleUrlConnectionFactory urlFactory = new SimpleUrlConnectionFactory(); try { InputStream inputStream = urlFactory.getStream(Uri.parse(baseUrl.toString())); Assert.fail("Can not have an unknown status code. This should have failed"); } catch (IOException e) { Assert.assertNotNull(e); } }
public InputStream getStream(Uri uri) throws IOException { return createConnection(uri, null, 0); }
SimpleUrlConnectionFactory implements UrlFactory { public InputStream getStream(Uri uri) throws IOException { return createConnection(uri, null, 0); } }
SimpleUrlConnectionFactory implements UrlFactory { public InputStream getStream(Uri uri) throws IOException { return createConnection(uri, null, 0); } SimpleUrlConnectionFactory();  SimpleUrlConnectionFactory(Map<String, String> requestProps); }
SimpleUrlConnectionFactory implements UrlFactory { public InputStream getStream(Uri uri) throws IOException { return createConnection(uri, null, 0); } SimpleUrlConnectionFactory();  SimpleUrlConnectionFactory(Map<String, String> requestProps); InputStream getStream(Uri uri); }
SimpleUrlConnectionFactory implements UrlFactory { public InputStream getStream(Uri uri) throws IOException { return createConnection(uri, null, 0); } SimpleUrlConnectionFactory();  SimpleUrlConnectionFactory(Map<String, String> requestProps); InputStream getStream(Uri uri);  }