void () { final MockFacet mockFacet = addFacet(); final VirtualFile configFile = findFile("config.xml"); assertNull(findFacet(configFile)); mockFacet.addRoot(configFile); assertSame(mockFacet, findFacet(configFile)); assertNull(myFacetFinder.findFacet(configFile, new FacetTypeId<MockFacet>("mock"))); final VirtualFile root = findFile("dir"); mockFacet.addRoot(root); assertSame(mockFacet, findFacet(findFile("dir/file.txt"))); mockFacet.removeRoot(configFile); assertNull(findFacet(configFile)); assertSame(mockFacet, findFacet(findFile("dir/file.txt"))); mockFacet.removeRoot(root); assertNull(findFacet(findFile("dir/file.txt"))); }