message: Add GenerateTransaction trait to the chain-core.
  GenerateTransaction trait may be used in order to
  ask a concrete environment to generate valid transaction
  for the future testing.
  This is implemented as a test so it's possible to
  define tests in a abstracted over the concrete ledger
  implementeation.
  Introduce run valid transactions test.
diff: @@ -209,7 +209,7 @@ pub trait Serializable: Sized {
  #[cfg(feature = "property-test-api")]
  pub mod testing {
  use super::*;
  - use quickcheck::Arbitrary;
  + use quickcheck::{Arbitrary, Gen};
  use std::io::Cursor;
  /// test that any arbitrary given object can serialize and deserialize
  @@ -262,4 +262,27 @@ pub mod testing {
  }
  }
  + /// Trait that provides a property of generation valid transactions
  + /// from the current state.
  + pub trait GenerateTransaction<T: Transaction> {
  + fn generate_transaction<G>(&mut self, g: &mut G) -> T
  + where
  + G: Gen;
  + }
  +
  + /// Generate a number of transactions and run them, it's not
  + /// expected to have any errors during the run.
  + pub fn run_valid_transactions<'a, G, L, T>(g: &'a mut G, ledger: &'a mut L, n: usize) -> ()
  + where
  + G: Gen,
  + L: Ledger<T> + GenerateTransaction<T>,
  + T: Transaction,
  + {
  + for _ in 0..n {
  + let tx = ledger.generate_transaction(g);
  + let update = ledger.diff_transaction(&tx).unwrap();
  + ledger.apply(update).unwrap();
  + }
  + }
  +
  }
  