public static void runner(Bank bank, CountDownLatch latch) {
    try {
      SecureRandom random = new SecureRandom();
      Thread.sleep(random.nextInt(1000));
      LOGGER.info("Start transferring...");
      for (int i = 0; i < 1000000; i++) {
        bank.transfer(random.nextInt(4), random.nextInt(4), random.nextInt(0, BASE_AMOUNT));
      }
      LOGGER.info("Finished transferring.");
      latch.countDown();
    } catch (InterruptedException e) {
      LOGGER.error(e.getMessage());
      Thread.currentThread().interrupt();
    }
  }
@Test
  void runnerShouldExecuteWithoutException() {
    var bank = new Bank(4, 1000);
    var latch = new CountDownLatch(1);

    assertDoesNotThrow(() -> Main.runner(bank, latch));
    assertEquals(0, latch.getCount());
  }