PsiFile (@NonNls String body) { return createFile("test.java", "class Test { " + body + "void throwsAnotherException() throws AnotherException {}" + "void throwsMyException() throws MyException {}" + "void throwsSomeException() throws SomeException {}" + "static class MyException extends Exception {}" + "static class SomeException extends Exception {}" + "static class AnotherException extends Exception {}" + "static class Exception{}" + "}"); }