@Test
public void execute_withValidUrlListAndListenerAndHttpResponses_shouldReturnMapOfUrlToDownloadResponse() throws Exception {

    subject = new ImageDownloadTaskManager(
            Arrays.asList(url1, url2),
            mMockImageTaskManagerListener,
            testMaxWidth
    );
    String imageData1 = "image_data_1";
    String imageData2 = "image_data_2";
    fakeHttpLayer.addPendingHttpResponse(200, imageData1);
    fakeHttpLayer.addPendingHttpResponse(200, imageData2);
    subject.execute();
    semaphore.acquire();
    assertThat(networkImages.keySet()).containsOnly(url1, url2);
    // These statements will fail if the objects are not of the correct type.
    DownloadResponse bitmap1 = networkImages.get(url1);
    DownloadResponse bitmap2 = networkImages.get(url2);
    verify(mMockImageTaskManagerListener).onSuccess(anyMap());
    verify(mMockImageTaskManagerListener, never()).onFail();
}