void () { PsiMethodCallExpression methodCall = createCall("void foo() { throwsMyException(); }"); List<PsiClassType> exceptions = ExceptionUtil.getUnhandledExceptions(methodCall, null); assertEquals(1, exceptions.size()); assertEquals("Test.MyException", exceptions.get(0).getCanonicalText()); }