void () { EntryPointsManagerBase.ClassPattern pattern = new EntryPointsManagerBase.ClassPattern(); pattern.pattern = "Foo"; pattern.method = "entry"; EntryPointsManagerBase.getInstance(getProject()).getPatterns().add(pattern); try { doTest(); } finally { EntryPointsManagerBase.getInstance(getProject()).getPatterns().clear(); } }