@Test
@SuppressWarnings("unchecked")
public void test() {

    final Accumulator<Boolean> accumulator = Mockito.mock(Accumulator.class);
    final FlaggingVisitor visitor = new FlaggingVisitor(accumulator);
    Assert.assertEquals(Void.class, visitor.apply(Void.class));
    Mockito.verify(accumulator).$plus$eq(true);
}