title: Check balance of individual accounts in unit tests
body: <p>I can't figure out how to test the balance of given accounts when writing unit tests.</p>
  <p>For example, Bob buys something. He pays 10 NEAR. 3 NEAR should go to <code>alice.near</code>, 7 NEAR should go to <code>bob.near</code>. I want to check if the 3 and the 7 NEAR are there. I'm using VMContext. I tried switching the context, so I can use <code>env::account_balance()</code>, but that will not solve my problem.</p>
  <pre class="lang-rust prettyprint-override"><code>let mut context = get_context(600_000_000_000_000_000_000_000);                                                       // Alice is person who interacts
          testing_env!(context.build());
          
          let mut contract = Contract::new_default_meta(to_valid_account(&quot;vault.near&quot;), to_valid_account(&quot;carol.near&quot;));       // Vault is owner, Carol will be admin
          let price = U128(500_000_000_000_000_000_000_000);
          
          contract.mint_root(test_token_metadata(), to_valid_account(&quot;carol.near&quot;), price.clone(), None,
              Some(HashMap::from([                                                                                            // Alice: 20%
                  (to_valid_account(&quot;alice.near&quot;), 2000),                                                                     // Vault: 80%
                  (to_valid_account(&quot;vault.near&quot;), 8000)
                  ]))
              );
          
          log!(&quot;caller: {:?}&quot;, env::current_account_id());
          log!(&quot;Alice balance: {:?}&quot;, env::account_balance());
          context.predecessor_account_id(to_valid_account(&quot;bob.near&quot;));                                                       // Bob interacts with the contract
          context.signer_account_id(to_valid_account(&quot;bob.near&quot;));
          //testing_env!(context.build());
          contract.buy_nft_from_vault(&quot;fono-root-0-0&quot;.to_string());
  
          context.predecessor_account_id(to_valid_account(&quot;alice.near&quot;));                                                       // Bob interacts with the contract
          context.signer_account_id(to_valid_account(&quot;alice.near&quot;));
          log!(&quot;caller: {:?}&quot;, env::current_account_id());
          log!(&quot;Alice balance: {:?}&quot;, env::account_balance());
  </code></pre>
  <p>I'm looking for a function that looks something like this: <code>context_get_balance(&quot;alice.near&quot;);</code> And it would give me the balance for <code>alice.near</code> in the simulated blockchain. Is it possible to do this somehow? Maybe it is not possible to do this. If not, what is the best approach when writing similar unit tests?</p>