@Test(expected = IOException.class)
public void testBadURL() throws IOException {

    final URL url = PowerMock.createMock(URL.class);
    url.openConnection();
    PowerMock.expectLastCall().andThrow(new IOException());
    replayAll();
    JSONParser.getJSONFromURL(url, ImageIngester.DEFAULT_CONNECT_TIMEOUT);
}