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: cluster_state_test.rs
    path of file: ./repos/databend/src/meta/service/tests/it/api/http
    
    the code of the file until where you have to start completion: // Copyright 2021 Datafuse Labs
//
// 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 in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

use std::fs::File;
use std::io::Read;
use std::string::String;
use std::time::Duration;

use databend_common_base::base::tokio;
use databend_common_base::base::tokio::time::Instant;
use databend_common_base::base::Stoppable;
use databend_common_meta_types::Node;
use databend_meta::api::http::v1::cluster_state::nodes_handler;
use databend_meta::api::h
    
async fn test_cluster_nodes() -> anyhow::Result<()> {
    let tc0 = MetaSrvTestContext::new(0);
    let mut tc1 = MetaSrvTestContext::new(1);

    tc1.config.raft_config.single = false;
    tc1.config.raft_config.join = vec![tc0.config.raft_config.raft_api_addr().await?.to_string()];

    let _mn0 = MetaNode::start(&tc0.config).await?;

    let mn1 = MetaNode::start(&tc1.config).await?;
    let res = mn1
        .join_cluster(
            &tc1.config.raft_config,
            tc1.config.grpc_api_advertise_address(),
        )
        .await?;
    assert_eq!(Ok(()), res);

    let cluster_router = Route::new()
        .at("/cluster/nodes", get(nodes_handler))
        .data(mn1.clone());
    let response = cluster_router
        .call(
            Request::builder()
                .uri(Uri::from_static("/cluster/nodes"))
                .method(Method::GET)
                .finish(),
        )
        .await
        .unwrap();
    assert_eq!(response.status(), StatusCode::OK);

    let body = response.into_body().into_vec().await.unwrap();
    let nodes: Vec<Node> = serde_json::from_slice(&body).unwrap();
    assert_eq!(nodes.len(), 2);
    Ok(())
}