message: add `test_get_from_non_existent_event_stream()`
  Closes:
  Approved by: wqfish
diff: @@ -6,7 +6,8 @@ use crate::test_helper::{arb_blocks_to_commit, arb_mock_genesis};
  use libra_crypto::hash::CryptoHash;
  use libra_temppath::TempPath;
  use libra_types::{
  - account_config::AccountResource, contract_event::ContractEvent, ledger_info::LedgerInfo,
  + account_config::AccountResource, contract_event::ContractEvent,
  + discovery_set::DISCOVERY_SET_CHANGE_EVENT_PATH, ledger_info::LedgerInfo,
  };
  use proptest::prelude::*;
  use std::collections::HashMap;
  @@ -454,4 +455,38 @@ proptest! {
  assert!(account_state_with_proof.blob.is_none());
  assert!(events.is_empty());
  }
  +
  + #[test]
  + fn test_get_from_non_existent_event_stream(
  + (genesis_txn_to_commit, ledger_info_with_sigs) in arb_mock_genesis(),
  + ) {
  + let tmp_dir = TempPath::new();
  + let db = LibraDB::new(&tmp_dir);
  +
  + let account = genesis_txn_to_commit
  + .transaction()
  + .as_signed_user_txn()
  + .unwrap()
  + .sender();
  +
  + db.save_transactions(&[genesis_txn_to_commit], 0, Some(&ledger_info_with_sigs)).unwrap();
  +
  + // The mock genesis txn is really just an ordinary user account, there is no
  + // DiscoverySetResource under it.
  + let (events, account_state_with_proof) = db
  + .get_events_by_query_path(
  + &AccessPath::new(account, DISCOVERY_SET_CHANGE_EVENT_PATH.to_vec()),
  + 0,
  + true,
  + 100,
  + 0,
  + )
  + .unwrap();
  +
  + account_state_with_proof
  + .verify(ledger_info_with_sigs.ledger_info(), 0, account)
  + .unwrap();
  + assert!(account_state_with_proof.blob.is_some());
  + assert!(events.is_empty());
  + }
  }
  