def validate_path_component(caller, name, test):
    """
    Function to validate a URI path component. Component is invalid
    if it contains space ( ), slash (/), escape (\\) or percent (%) characters.

    Arguments:
    caller : caller object
    name : name of the component
    test : component to be tested

    An assertionError is thrown when the the provided test argument
    is invalid
    """
    assert ' ' not in test and '/' not in test and '||' not in test and '%' not in test, caller.__class__.__name__ + ': invalid ' + name + ': may not contain space ( ), slash (/), escape (\\), or percent (%)'
