@Test
public void testStatusCode() throws Exception {

    mockWebServer.enqueue(new MockResponse().setResponseCode(-1).setBody("yay!"));
    SimpleUrlConnectionFactory urlFactory = new SimpleUrlConnectionFactory();
    try {
        InputStream inputStream = urlFactory.getStream(Uri.parse(baseUrl.toString()));
        Assert.fail("Can not have a -1 status code. This should have failed");
    } catch (IOException e) {
        Assert.assertNotNull(e);
    }
}