@Test
public void add() {

    @SuppressWarnings("unchecked")
    IndexedRingBuffer<LSubscription> list = IndexedRingBuffer.getInstance();
    list.add(new LSubscription(1));
    list.add(new LSubscription(2));
    final AtomicInteger c = new AtomicInteger();
    list.forEach(newCounterAction(c));
    assertEquals(2, c.get());
}