def METHOD_NAME(monkeypatch, is_leapp_invoked_with_debug):
    def get_boot_file_paths_mocked():
        return '/abc', '/def'
    monkeypatch.setattr(addupgradebootentry, 'get_boot_file_paths', get_boot_file_paths_mocked)
    monkeypatch.setattr(api, 'produce', produce_mocked())
    monkeypatch.setenv('LEAPP_DEBUG', '1' if is_leapp_invoked_with_debug else '0')
    monkeypatch.setattr(addupgradebootentry, 'run', run_mocked())
    monkeypatch.setattr(api, 'current_actor', CurrentActorMocked())
    addupgradebootentry.add_boot_entry()
    expected_produced_messages = []
    if is_leapp_invoked_with_debug:
        expected_produced_messages = [TargetKernelCmdlineArgTasks(to_remove=[KernelCmdlineArg(key='debug')])]
    expected_produced_messages.append(
        TargetKernelCmdlineArgTasks(to_remove=[KernelCmdlineArg(key='enforcing', value='0')])
    )
    assert api.produce.model_instances == expected_produced_messages