@Override
    public PathAttributes find(final Path file, final ListProgressListener listener) throws BackgroundException {
        if(file.isRoot()) {
            return PathAttributes.EMPTY;
        }
        try {
            return new MantaObjectAttributeAdapter(session)
                    .toAttributes(session.getClient().head(file.getAbsolute()));
        }
        catch(MantaException e) {
            throw new MantaExceptionMappingService().map("Failure to read attributes of {0}", e, file);
        }
        catch(MantaClientHttpResponseException e) {
            throw new MantaHttpExceptionMappingService().map("Failure to read attributes of {0}", e, file);
        }
        catch(IOException e) {
            throw new DefaultIOExceptionMappingService().map("Failure to read attributes of {0}", e, file);
        }
    }
@Test(expected = NotfoundException.class)
    public void testFindNotFound() throws Exception {
        try {
            new MantaAttributesFinderFeature(session).find(randomFile());
        }
        catch(NotfoundException e) {
            assertEquals("Not Found. Please contact your web hosting service provider for assistance.", e.getDetail());
            throw e;
        }
    }