void () { PsiMethodCallExpression methodCall = createCall("void foo() throws IllegalAccessException { throwsIOException(); }"); List<PsiClassType> exceptions = ExceptionUtil.getUnhandledExceptions(methodCall, null); assertEquals(1, exceptions.size()); assertEquals("java.io.IOException", exceptions.get(0).getCanonicalText()); }