PyClass (final String name) { final Project project = myFixture.getProject(); final Collection<PyClass> classes = PyClassNameIndex.find(name, project, false); Assert.assertThat(String.format("Expected one class named %s", name), classes, Matchers.hasSize(1)); return classes.iterator().next(); }