@Override
    public String getFileId(final Path file) throws BackgroundException {
        try {
            if(StringUtils.isNotBlank(file.attributes().getFileId())) {
                return file.attributes().getFileId();
            }
            final String cached = super.getFileId(file);
            if(cached != null) {
                if(log.isDebugEnabled()) {
                    log.debug(String.format("Return cached fileid %s for file %s", cached, file));
                }
                return cached;
            }
            if(file.isRoot()) {
                return ROOT;
            }
            int offset = 0;
            UiFsModel fsModel;
            final int chunksize = new HostPreferences(session.getHost()).getInteger("eue.listing.chunksize");
            do {
                final String parentResourceId = this.getFileId(file.getParent());
                switch(parentResourceId) {
                    case EueResourceIdProvider.ROOT:
                    case EueResourceIdProvider.TRASH:
                        fsModel = new ListResourceAliasApi(new EueApiClient(session)).resourceAliasAliasGet(parentResourceId,
                                null, null, null, null, chunksize, offset, null, null);
                        break;
                    default:
                        fsModel = new ListResourceApi(new EueApiClient(session)).resourceResourceIdGet(parentResourceId,
                                null, null, null, null, chunksize, offset, null, null);
                }
                for(Children child : fsModel.getUifs().getChildren()) {
                    // Case insensitive
                    if(child.getUifs().getName().equalsIgnoreCase(normalizer.normalize(file.getName()).toString())) {
                        return getResourceIdFromResourceUri(child.getUifs().getResourceURI());
                    }
                }
                offset += chunksize;
            }
            while(fsModel.getUifs().getChildren().size() == chunksize);
            throw new NotfoundException(file.getAbsolute());
        }
        catch(ApiException e) {
            throw new EueExceptionMappingService().map("Failure to read attributes of {0}", e, file);
        }
    }
@Test
    public void testFindCaseInsensitive() throws Exception {
        final EueResourceIdProvider fileid = new EueResourceIdProvider(session);
        final Path folder = new EueDirectoryFeature(session, fileid).mkdir(new Path(new AlphanumericRandomStringService().random(), EnumSet.of(AbstractPath.Type.directory)), new TransferStatus());
        folder.withAttributes(new EueAttributesFinderFeature(session, fileid).find(folder));
        assertEquals(folder.attributes().getFileId(), fileid.getFileId(folder));
        assertEquals(folder.attributes().getFileId(), fileid.getFileId(new Path(StringUtils.lowerCase(folder.getAbsolute()), folder.getType())));
        assertEquals(folder.attributes().getFileId(), fileid.getFileId(new Path(StringUtils.upperCase(folder.getAbsolute()), folder.getType())));
        final Path file = createFile(fileid, new Path(folder, new AlphanumericRandomStringService().random(), EnumSet.of(Path.Type.file)), RandomUtils.nextBytes(124));
        fileid.clear();
        assertEquals(file.attributes().getFileId(), fileid.getFileId(file));
        assertEquals(file.attributes().getFileId(), fileid.getFileId(new Path(StringUtils.lowerCase(file.getAbsolute()), file.getType())));
        assertEquals(file.attributes().getFileId(), fileid.getFileId(new Path(StringUtils.upperCase(file.getAbsolute()), file.getType())));
        new EueDeleteFeature(session, fileid).delete(Collections.singletonList(folder), new DisabledLoginCallback(), new Delete.DisabledCallback());
    }