void () { ModifiableRootModel rootModel = createRootModel(); Library library = rootModel.getModuleLibraryTable().createLibrary(); VirtualFile virtualFile = addClassRoot(library); ValidFileCellAppearance appearance = (ValidFileCellAppearance)myService.forLibrary(myProject, library, false); assertEquals(virtualFile, appearance.getFile()); }