  @Test
  public void testRegisterTask() {

    AtomicBoolean ab = new AtomicBoolean();
    network.registerTask(() -> ab.set(true), 100, n0);

    network.runMs(99);
    Assert.assertFalse(ab.get());

    network.runMs(1);
    Assert.assertTrue(ab.get());
    Assert.assertEquals(0, network.msgs.size());
  }