@Override
    public PathAttributes find(final Path file, final ListProgressListener listener) throws BackgroundException {
        if(file.isRoot()) {
            return PathAttributes.EMPTY;
        }
        if(new DefaultPathContainerService().isContainer(file)) {
            return PathAttributes.EMPTY;
        }
        final Path query;
        if(file.isPlaceholder()) {
            query = new Path(file.getParent(), FilenameUtils.removeExtension(file.getName()), file.getType(), file.attributes());
        }
        else {
            query = file;
        }
        final AttributedList<Path> list;
        if(new SimplePathPredicate(DriveHomeFinderService.SHARED_DRIVES_NAME).test(file.getParent())) {
            list = new DriveTeamDrivesListService(session, fileid).list(file.getParent(), listener);
        }
        else {
            list = new FileidDriveListService(session, fileid, query).list(file.getParent(), listener);
        }
        final Path found = list.find(new ListFilteringFeature.ListFilteringPredicate(session.getCaseSensitivity(), file));
        if(null == found) {
            throw new NotfoundException(file.getAbsolute());
        }
        return found.attributes();

    }
@Test
    public void testChangedFileId() throws Exception {
        final DriveFileIdProvider fileid = new DriveFileIdProvider(session);
        final Path room = new DriveDirectoryFeature(session, fileid).mkdir(
                new Path(MYDRIVE_FOLDER, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.directory)), new TransferStatus());
        final Path test = new DriveTouchFeature(session, fileid).touch(new Path(room, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), new TransferStatus());
        final String latestnodeid = test.attributes().getFileId();
        assertNotNull(latestnodeid);
        // Assume previously seen but changed on server
        fileid.cache(test, String.valueOf(RandomUtils.nextLong()));
        final DriveAttributesFinderFeature f = new DriveAttributesFinderFeature(session, fileid);
        assertEquals(latestnodeid, f.find(new Path(test).withAttributes(PathAttributes.EMPTY)).getFileId());
        new DriveDeleteFeature(session, fileid).delete(Collections.singletonList(room), new DisabledLoginCallback(), new Delete.DisabledCallback());
    }