TestLookupElementPresentation (@NotNull LookupElement e) { TestLookupElementPresentation p = new TestLookupElementPresentation(); try { ReadAction.nonBlocking(()-> { //noinspection rawtypes LookupElementRenderer renderer = e.getExpensiveRenderer(); if (renderer == null) { e.renderElement(p); } else { //noinspection unchecked renderer.renderElement(e, p); } }).submit(AppExecutorUtil.getAppExecutorService()).get(); } catch (InterruptedException | ExecutionException ex) { throw new RuntimeException(ex); } return p; }