def METHOD_NAME(
    self, m_environment, event_mode, env_return, env_list, event
):
    m_environment.return_value = env_return
    with mock.patch.object(event, "_event_logger_mode", event_mode):
        fake_stdout = io.StringIO()
        with contextlib.redirect_stdout(fake_stdout):
            event.set_command("status")
            event.set_output_content(
                {
                    "some_status_key": "some_status_information",
                    "a_list_of_things": ["first", "second", "third"],
                    "services": [],
                }
            )
            event.info(info_msg="test")
            event.error(error_msg="error1")
            event.warning(warning_msg="warning1")
            event.process_events()
        expected_machine_out = {
            "some_status_key": "some_status_information",
            "a_list_of_things": ["first", "second", "third"],
            "environment_vars": env_list,
            "services": [],
            "result": "failure",
            "errors": [
                {
                    "message": "error1",
                    "message_code": None,
                    "service": None,
                    "type": "system",
                }
            ],
            "warnings": [
                {
                    "message": "warning1",
                    "message_code": None,
                    "service": None,
                    "type": "system",
                }
            ],
        }
        expected_cli_out = "test"
    if event_mode == EventLoggerMode.CLI:
        assert expected_cli_out == fake_stdout.getvalue().strip()
    elif event_mode == EventLoggerMode.JSON:
        assert expected_machine_out == json.loads(
            fake_stdout.getvalue().strip()
        )
    else:
        assert expected_machine_out == safe_load(
            fake_stdout.getvalue().strip()
        )