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: api.rs
    path of file: ./repos/exonum/test-suite/testkit/tests
    
    the code of the file until where you have to start completion: // Copyright 2020 The Exonum Team
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//   http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to
    
async fn test_no_old_artifact_after_unload(unload: bool) {
    let (mut testkit, _) = init_testkit();
    let keys = testkit.us().service_keypair();

    // Freeze and migrate the service.
    let tx = keys.freeze_service(SUPERVISOR_INSTANCE_ID, SERVICE_ID);
    let block = testkit.create_block_with_transaction(tx);
    block[0].status().unwrap();

    let tx = keys.start_migration(
        SUPERVISOR_INSTANCE_ID,
        StartMigration {
            instance_id: SERVICE_ID,
            new_artifact: ApiServiceV2.artifact_id(),
            migration_len: 0,
        },
    );
    let block = testkit.create_block_with_transaction(tx);
    block[0].status().unwrap();

    if unload {
        // Unload the old service artifact.
        let tx = keys.unload_artifact(SUPERVISOR_INSTANCE_ID, ApiService.artifact_id());
        let block = testkit.create_block_with_transaction(tx);
        block[0].status().unwrap();
    }

    // Restart the testkit.
    let stopped = testkit.stop();
    let runtime = RustRuntime::builder()
        .with_factory(Supervisor)
        .with_factory(ApiServiceV2); // We don't need migration capabilities now.
    let mut testkit = stopped.resume(runtime);
    let api = testkit.api();

    // Check the HTTP API of the updated service.
    let pong: u64 = api
        .public(ApiKind::Service(SERVICE_NAME))
        .query(&PingQuery { value: 10 })
        .get("ping-pong")
        .await
        .expect("API should work fine after testkit restart");
    assert_eq!(pong, 11);
}