def METHOD_NAME(self, kube_apis, crd_ingress_controller, virtual_server_setup):
    text = f"{virtual_server_setup.namespace}/{virtual_server_setup.vs_name}"
    event_text = f"VirtualServer {text} was rejected with error:"
    invalid_fields = ["spec.routes[0].action.redirect.code", "spec.routes[1].action.redirect.url"]
    vs_src = f"{TEST_DATA}/virtual-server-redirects/virtual-server-invalid.yaml"
    patch_virtual_server_from_yaml(
        kube_apis.custom_objects, virtual_server_setup.vs_name, vs_src, virtual_server_setup.namespace
    )
    wait_before_test(2)
    wait_and_assert_status_code(
        404, virtual_server_setup.backend_1_url, virtual_server_setup.vs_host, allow_redirects=False
    )
    vs_events = get_events(kube_apis.v1, virtual_server_setup.namespace)
    assert_event_starts_with_text_and_contains_errors(event_text, vs_events, invalid_fields)