@Override
  public boolean retainAll(Collection<?> collection) {
    // Using this implementation from the Android ArrayList since the Java 1.8 ArrayList
    // doesn't call through to remove. Calling through to remove lets us leverage the notification
    // done there
    boolean result = false;
    Iterator<?> it = iterator();
    while (it.hasNext()) {
      if (!collection.contains(it.next())) {
        it.remove();
        result = true;
      }
    }
    return result;
  }
@Test
  public void testRetainAll() {
    List<EpoxyModel<?>> modelsToRetain = new ArrayList<>();
    modelsToRetain.add(modelList.get(0));

    modelList.retainAll(modelsToRetain);
    verify(observer, times(2)).onItemRangeRemoved(1, 1);
  }