@Test
public void testAddNullFuture() {

    @SuppressWarnings("unchecked")
    Promise<Void> p = mock(Promise.class);
    PromiseAggregator<Void, Future<Void>> a =
            new PromiseAggregator<Void, Future<Void>>(p);
    expectedException.expect(NullPointerException.class);
    a.add((Promise<Void>[]) null);
}