@Override
    public PathAttributes find(final Path file, final ListProgressListener listener) throws BackgroundException {
        try {
            final PathContainerService service = new DefaultPathContainerService();
            if(service.isContainer(file)) {
                for(RootFolder r : session.roots()) {
                    if(StringUtils.equalsIgnoreCase(file.getName(), PathNormalizer.name(r.getPath()))
                            || StringUtils.equalsIgnoreCase(file.getName(), PathNormalizer.name(r.getName()))) {
                        return this.toAttributes(r);
                    }
                }
                throw new NotfoundException(file.getAbsolute());
            }
            final FilesApi files = new FilesApi(session.getClient());
            return this.toAttributes(files.filesGet_0(URIEncoder.encode(fileid.getPrefixedPath(file))));
        }
        catch(ApiException e) {
            throw new StoregateExceptionMappingService(fileid).map("Failure to read attributes of {0}", e, file);
        }
    }
@Test
    public void testChangedNodeId() throws Exception {
        final StoregateIdProvider nodeid = new StoregateIdProvider(session);
        final Path room = new StoregateDirectoryFeature(session, nodeid).mkdir(
                new Path(String.format("/My files/%s", new AlphanumericRandomStringService().random()),
                        EnumSet.of(Path.Type.directory, Path.Type.volume)), new TransferStatus());
        final Path test = new StoregateTouchFeature(session, nodeid).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
        nodeid.cache(test, String.valueOf(RandomUtils.nextLong()));
        final StoregateAttributesFinderFeature f = new StoregateAttributesFinderFeature(session, nodeid);
        assertEquals(latestnodeid, f.find(test).getFileId());
        new StoregateDeleteFeature(session, nodeid).delete(Collections.singletonList(room), new DisabledLoginCallback(), new Delete.DisabledCallback());
    }