@Test
public void onBindViewHolder() {


    // 3 elements and each element has it's own viewtype and hence own delegate
    List<Object> items = Arrays.asList(new Object(), new Object(), new Object());
    SpyableAdapterDelegate<List<Object>> d0 = new SpyableAdapterDelegate<>(0);
    SpyableAdapterDelegate<List<Object>> d1 = new SpyableAdapterDelegate<>(1);
    SpyableAdapterDelegate<List<Object>> d2 = new SpyableAdapterDelegate<>(2);

    AdapterDelegatesManager<List<Object>> manager = new AdapterDelegatesManager<>();
    manager.addDelegate(d0);
    manager.addDelegate(d1);
    manager.addDelegate(d2);

    // Test first item
    manager.onBindViewHolder(items, 0, d0.viewHolder);
    Assert.assertTrue(d0.onBindViewHolderCalled);
    Assert.assertFalse(d1.onBindViewHolderCalled);
    Assert.assertFalse(d2.onBindViewHolderCalled);

    resetDelegates(d0, d1, d2);

    // Test second item
    manager.onBindViewHolder(items, 1, d1.viewHolder);
    Assert.assertTrue(d1.onBindViewHolderCalled);
    Assert.assertFalse(d0.onBindViewHolderCalled);
    Assert.assertFalse(d2.onBindViewHolderCalled);

    resetDelegates(d0, d1, d2);

    // Test third item
    manager.onBindViewHolder(items, 2, d2.viewHolder);
    Assert.assertTrue(d2.onBindViewHolderCalled);
    Assert.assertFalse(d1.onBindViewHolderCalled);
    Assert.assertFalse(d0.onBindViewHolderCalled);

    resetDelegates(d0, d1, d2);
}