void (@NotNull CompletionType type, int count, CheckType checkType, String... variants) { myFixture.complete(type, count); LookupElement[] elements = myFixture.getLookupElements(); List<String> stringList = elements == null ? null : ContainerUtil.map(elements, ShFileCompletionTest::getLookupString); assertNotNull("\nPossibly the single variant has been completed.\nFile after:\n" + myFixture .getFile().getText(), stringList); Collection<String> varList = new ArrayList<>(List.of(variants)); if (checkType == CheckType.ORDERED_EQUALS) { assertOrderedEquals(stringList, variants); } else if (checkType == CheckType.EQUALS) { assertSameElements(stringList, variants); } else if (checkType == CheckType.INCLUDES) { varList.removeAll(stringList); assertTrue("Missing variants: " + varList, varList.isEmpty()); } else if (checkType == CheckType.EXCLUDES) { varList.retainAll(stringList); assertTrue("Unexpected variants: " + varList, varList.isEmpty()); } }