PsiMethodCallExpression (@NonNls final String body) { final PsiFile file = createFile("test.java", "class Test { " + body + "void throwsIOException() throws java.io.IOException {}" + "void throwsRuntimeException() throws RuntimeException {}" + "void throwsError() throws Error {}" + "}"); PsiMethodCallExpression methodCall = findMethodCall(file); assertNotNull(methodCall); return methodCall; }