def _helper_assert_formatted_contents(
    starting_contents,
    use_color,
    color_config,
    squeeze,
    subs,
    colorized_contents,
    squeezed_contents,
    subbed_contents,
    formatted_result,
    sub_method,
    squeeze_method,
    color_method,
):
    """
    Helper method to assist in asserting things about the
    get_formatted_contents method.

    starting_contents: the starting string that we are working with
    use_color: True if we should use color
    color_config: the color config to be passed to get_colorized_contents
    squeeze: True if we should squeeze
    subs: the list of Substitutions that we should pass to
        get_substituted_contents
    colored_contents: the result of get_colorized_contents
    squeezed_contents: the result of get_squeezed_contents
    subbed_contents: the result of subbed_contents
    formatted_result: the final, formatted string that should be returned
    """
    sub_method.return_value = subbed_contents
    squeeze_method.return_value = squeezed_contents
    color_method.return_value = colorized_contents

    actual = util.get_formatted_contents(
        starting_contents,
        use_color,
        color_config,
        squeeze,
        subs
    )

    # We'll update the contents as they get formatted to make sure
    # we pass the right thing to the various methods.
    contents_thus_far = starting_contents

    if use_color:
        color_method.assert_called_once_with(
            contents_thus_far,
            color_config
        )
        contents_thus_far = colorized_contents
    else:
        assert color_method.call_count == 0

    if squeeze:
        squeeze_method.assert_called_once_with(contents_thus_far)
        contents_thus_far = squeezed_contents
    else:
        assert squeeze_method.call_count == 0

    if subs:
        sub_method.assert_called_once_with(
            contents_thus_far,
            subs
        )
        contents_thus_far = subbed_contents
    else:
        assert sub_method.call_count == 0

    assert actual == formatted_result

    Helper method to assist in asserting things about the
    get_formatted_contents method.

    starting_contents: the starting string that we are working with
    use_color: True if we should use color
    color_config: the color config to be passed to get_colorized_contents
    squeeze: True if we should squeeze
    subs: the list of Substitutions that we should pass to
        get_substituted_contents
    colored_contents: the result of get_colorized_contents
    squeezed_contents: the result of get_squeezed_contents
    subbed_contents: the result of subbed_contents
    formatted_result: the final, formatted string that should be returned
    
test/util_test.py