@Test
public void testUnsubscribeOnOneDoesntKillBatch() throws Exception {

    TestCollapserTimer timer = new TestCollapserTimer();
    HystrixCollapser<List<String>, String, String> collapser1 = new TestRequestCollapser(timer, 1);
    Future<String> response1 = collapser1.queue();
    Future<String> response2 = new TestRequestCollapser(timer, 2).queue();
    // kill the first
    response1.cancel(true);
    timer.incrementTime(10); // let time pass that equals the default delay/period
    // the first is cancelled so should return null
    try {
        response1.get(1000, TimeUnit.MILLISECONDS);
        fail("expect CancellationException after cancelling");
    } catch (CancellationException e) {
        // expected
    }
    // we should still get a response on the second
    assertEquals("2", response2.get(1000, TimeUnit.MILLISECONDS));
    assertEquals(1, HystrixRequestLog.getCurrentRequest().getAllExecutedCommands().size());
    Iterator<HystrixInvokableInfo<?>> cmdIterator = HystrixRequestLog.getCurrentRequest().getAllExecutedCommands().iterator();
    assertEquals(1, cmdIterator.next().getNumberCollapsed());
}