message: Deduplicate test Validators creation.
diff: @@ -396,12 +396,7 @@ pub(crate) mod tests {
  types::Timestamp,
  };
  - #[test]
  - fn invalid_signature_error() {
  - let mut rng = TestRng::new();
  -
  - let state: State<TestContext> = State::new_test(WEIGHTS, 0);
  - let validators = {
  + fn test_validators() -> Validators<u32> {
  let vid_weights: Vec<(u32, u64)> =
  vec![(ALICE_SEC, ALICE), (BOB_SEC, BOB), (CAROL_SEC, CAROL)]
  .into_iter()
  @@ -411,10 +406,16 @@ pub(crate) mod tests {
  })
  .collect();
  Validators::from_iter(vid_weights)
  - };
  + }
  +
  + #[test]
  + fn invalid_signature_error() {
  + let mut rng = TestRng::new();
  +
  + let state: State<TestContext> = State::new_test(WEIGHTS, 0);
  let mut highway = Highway {
  instance_id: 1u64,
  - validators,
  + validators: test_validators(),
  state,
  active_validator: None,
  };
  @@ -456,20 +457,9 @@ pub(crate) mod tests {
  let mut rng = TestRng::new();
  let state: State<TestContext> = State::new_test(WEIGHTS, 0);
  - let validators = {
  - let vid_weights: Vec<(u32, u64)> =
  - vec![(ALICE_SEC, ALICE), (BOB_SEC, BOB), (CAROL_SEC, CAROL)]
  - .into_iter()
  - .map(|(sk, vid)| {
  - assert_eq!(sk.0, vid.0);
  - (sk.0, WEIGHTS[vid.0 as usize].0)
  - })
  - .collect();
  - Validators::from_iter(vid_weights)
  - };
  let highway = Highway {
  instance_id: 1u64,
  - validators,
  + validators: test_validators(),
  state,
  active_validator: None,
  };
  