void () { addMagicConstant(); myFixture.configureByText("a.java", """ class TestAssignment { interface States { int INIT =0; int RUNNING = 1; int STOPPED = 2; } @org.intellij.lang.annotations.MagicConstant(valuesFromClass = States.class) int state = <caret>; public TestAssignment() { this.state = 0; } }"""); myFixture.complete(CompletionType.SMART); myFixture.assertPreferredCompletionItems(0, "INIT", "RUNNING", "STOPPED"); LookupManager.getInstance(getProject()).hideActiveLookup(); myFixture.complete(CompletionType.BASIC); myFixture.assertPreferredCompletionItems(0, "INIT", "RUNNING", "STOPPED"); }