void () { addMagicConstant(); myFixture.configureByText("a.java", """ import org.intellij.lang.annotations.MagicConstant; enum MagicConstantTest { FOO(<caret>), ; private final int magicConstant; MagicConstantTest(@MagicConstant(valuesFromClass = MagicConstantIds.class) int magicConstant) { this.magicConstant = magicConstant; } } class MagicConstantIds { static final int ONE = 1; static final int TWO = 2; } """); myFixture.completeBasic(); myFixture.assertPreferredCompletionItems(0, "ONE", "TWO"); }