void (PsiReference reference, boolean expectEnumValues) { final String[] variants = Arrays.stream(reference.getVariants()) .filter(LookupElement.class::isInstance) .map(LookupElement.class::cast) .map(LookupElement::getLookupString) .toArray(String[]::new); final boolean containsEnumValues = ArrayUtil.contains("AAA", variants) && ArrayUtil.contains("AAX", variants) && ArrayUtil.contains("BBB", variants); if (expectEnumValues) { assertTrue(containsEnumValues, "Completion variants: " + Arrays.toString(variants)); } else { assertFalse(containsEnumValues, "Completion variants: " + Arrays.toString(variants)); } }