void () { myFixture.addClass("package org.junit.jupiter.api;" + "@org.junit.platform.commons.annotation.Testable public @interface Test {}"); PsiFile file = myFixture.configureByText("TestableClassTest.java", """ @org.junit.platform.commons.annotation.Testable class TestableClassTest { \tvoid foo() {} }"""); PsiClass aClass = ((PsiClassOwner)file).getClasses()[0]; assertTrue(JUnitUtil.isTestClass(aClass)); assertTrue(JUnitUtil.isTestMethod(PsiLocation.fromPsiElement(aClass.getMethods()[0]))); }