### Question:
LinkedTreeSet extends AbstractSet<E> { @Override public boolean retainAll(Collection<?> c) { return super.retainAll(new LinkedTreeSet<>(c)); } LinkedTreeSet();  LinkedTreeSet(Collection<? extends E> other); @Override boolean add(E e); @Override boolean remove(Object o); @Override boolean removeAll(Collection<?> c); @Override boolean retainAll(Collection<?> c); @Override void clear(); @Override boolean contains(Object o); @Override Iterator<E> iterator(); @Override int hashCode(); @Override boolean equals(Object o); @Override int size(); @Override String toString();  }### Answer:
@Test void testRetainAll() throws Exception { Set<Object> set = new LinkedTreeSet<>(); set.add(1.0); set.add(0); set.add(2); set.retainAll(Arrays.asList(0.0, 2.0)); assertThat(set).containsExactly(0, 2); }
@Test void testSizeAfterRetainAll() throws Exception { Set<Object> set = new LinkedTreeSet<>(Arrays.asList("A", "B", "C")); set.retainAll(Arrays.asList("B", "C")); assertThat(set).containsExactly("B", "C"); assertThat(set).hasSize(2); }