void (@NotNull String text, @NotNull String expected) { myFixture.configureByText(JavaFileType.INSTANCE, text); ShowExpressionTypeHandler handler = new ShowExpressionTypeHandler(false); Map<PsiElement, ExpressionTypeProvider> map = handler.getExpressions(myFixture.getFile(), myFixture.getEditor()); //noinspection unchecked assertEquals(expected, StringUtil.join(map.entrySet(), o -> o.getValue().getInformationHint(o.getKey()), ", ")); }