// "Replace with 'java.util.TreeSet' constructor" "true-preview"

import java.util.*;
import java.util.stream.*;

class Test {
  public static <T, T1 extends T> void test(List<T1> s) {
    s.stream().colle<caret>ct(Collectors.toCollection(TreeSet<T>::new)).contains("abc");
  }
}