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

    PowerMock.mockStatic(NetworkUtils.class);
    final String notJSON = "I am not json";
    final URL url = PowerMock.createMock(URL.class);
    InputStream is = null;
    try {
        is = new ByteArrayInputStream(notJSON.getBytes());
        NetworkUtils.getDataFromURL(url, null, ImageIngester.DEFAULT_CONNECT_TIMEOUT);
        PowerMock.expectLastCall().andReturn(notJSON.getBytes());
        replayAll();
        JSONParser.getJSONFromURL(url, null, ImageIngester.DEFAULT_CONNECT_TIMEOUT);
    } finally {
        if (is != null) {
            is.close();
        }
    }
    fail("Source is invalid json");
}