void () { doTest(""" import java.util.Comparator;abstract class UserSession { private static final Comparator<UserSession> USER_SESSION_COMPARATOR = Comparator .comp<caret>aring(new java.util.function.Function<UserSession, String>() { @Override public String apply(UserSession userSession) { return userSession.toString(); }}); }""", """ import java.util.Comparator; import java.util.function.Function; abstract class UserSession { private static final Comparator<UserSession> USER_SESSION_COMPARATOR = Comparator .<UserSession, String>comparing(new Function<UserSession, String>() { @Override public String apply(UserSession userSession) { return userSession.toString(); } }); }"""); }