### Question:
MultipleResourceHttpFetcher { public Map<Uri, FutureTask<RequestContext>> fetchUnique(List<HttpRequest> requests) { Map<Uri, FutureTask<RequestContext>> futureTasks = Maps.newHashMap(); for (HttpRequest request : requests) { Uri uri = request.getUri(); if (!futureTasks.containsKey(uri)) { futureTasks.put(uri, createHttpFetcher(request)); } } return futureTasks; } MultipleResourceHttpFetcher(RequestPipeline requestPipeline, Executor executor); List<Pair<Uri, FutureTask<RequestContext>>> fetchAll(List<HttpRequest> requests); Map<Uri, FutureTask<RequestContext>> fetchUnique(List<HttpRequest> requests);  }### Answer:
@Test public void testFetchUnique() throws Exception { List<HttpRequest> requests = createRequestArray(); expect(requestPipeline.execute(eq(reqCxt1.getHttpReq()))).andReturn(reqCxt1.getHttpResp()); expect(requestPipeline.execute(eq(reqCxt2.getHttpReq()))).andReturn(reqCxt2.getHttpResp()); replay(); Map<Uri, FutureTask<RequestContext>> futureTasks = fetcher.fetchUnique(requests); assertEquals(2, futureTasks.size()); assertTrue(futureTasks.containsKey(IMG_URI)); assertEquals(reqCxt1, futureTasks.get(IMG_URI).get()); assertTrue(futureTasks.containsKey(CSS_URI)); assertEquals(reqCxt2, futureTasks.get(CSS_URI).get()); verify(); }