PyClass (final String name) { final Project project = myFixture.getProject(); final Collection<PyClass> classes = PyClassNameIndex.find(name, project, false); assertEquals(1, classes.size()); return classes.iterator().next(); }