void () { PsiClass aClass = getFile("MyClass").getClasses()[0]; assertEquals("method1", aClass.getMethods()[0].getName()); PsiMethod method1 = aClass.getMethods()[0]; PsiTypeElement type1 = method1.getReturnTypeElement(); assertNotNull(type1); assertEquals(method1, type1.getParent()); assertEquals("void", type1.getText()); assertTrue(type1.getType() instanceof PsiPrimitiveType); assertFalse(method1.isConstructor()); PsiMethod method3 = aClass.getMethods()[2]; assertNull(method3.getReturnType()); assertTrue(method3.isConstructor()); }