You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: pause.rs
    path of file: ./repos/pueue/pueue/tests/daemon/integration
    
    the code of the file until where you have to start completion: use anyhow::{Context, Result};
use pueue_lib::network::message::*;
use pueue_lib::state::GroupStatus;
use pueue_lib::task::*;

use crate::helper::*;

/// Make sure that no tasks will be started in a paused queue
#[tokio::test(flavor = "multi_thread", worker_threads = 2)]
async fn test_pause_daemon() -> Result<()> {
    let daemon = daemon().await?;
    let shared = &daemon.settings.shared;

    // This pauses the daemon
    pause_tasks(shared, TaskSelection::All).await?;
    // Make sure the default group get's paused
    wait_for_group_status(shared, PUEUE_DEFAULT_GROUP, GroupStatus::Paused).await?;

    // Add a task and give the taskmanager time to theoretically start the process
    add_task(shared, "ls").await?;
    sleep_ms(500).await;

    // Make sure it's not s
    
async fn test_pause_with_wait() -> Result<()> {
    let daemon = daemon().await?;
    let shared = &daemon.settings.shared;

    // Start a long running task and make sure it's started
    add_task(shared, "sleep 60").await?;
    wait_for_task_condition(shared, 0, |task| task.is_running()).await?;

    // Pauses the default queue while waiting for tasks
    let message = PauseMessage {
        tasks: TaskSelection::Group(PUEUE_DEFAULT_GROUP.into()),
        wait: true,
    };
    send_message(shared, message)
        .await
        .context("Failed to send message")?;

    // Make sure the default group gets paused, but the task is still running
    wait_for_group_status(shared, PUEUE_DEFAULT_GROUP, GroupStatus::Paused).await?;
    let state = get_state(shared).await?;
    assert_eq!(state.tasks.get(&0).unwrap().status, TaskStatus::Running);

    Ok(())
}