class ContentNegotiationHandler {

    protected Resource getResource(ClientResourceLookup resourceLookup){
        final String uri = resourceLookup.getUri();
        if(uri == null || uri.isEmpty()){
            throw new MandatoryParameterNotFoundException("uri");
        }
        final Resource resource = repository.getResource(ExecutionContextImpl.getRuntimeExecutionContext(), uri);
        if(resource == null){
            throw new ReferencedResourceNotFoundException(uri, "uri");
        }
        return resource;
    }

}