/** @deprecated to suppress deprecation warnings */
  public void testCancellation() {
    TestProgressMonitor root = new TestProgressMonitor();
    root.beginTask("", 1000);

    SubProgressMonitor spm = new SubProgressMonitor(root, 1000);

    // Test that changes at the root propogate to the child
    root.setCanceled(true);
    Assert.assertTrue(spm.isCanceled());
    root.setCanceled(false);
    Assert.assertFalse(spm.isCanceled());

    // Test that changes to the child propogate to the root
    spm.setCanceled(true);
    Assert.assertTrue(root.isCanceled());
    spm.setCanceled(false);
    Assert.assertFalse(root.isCanceled());

    // Test a chain of depth 2
    spm.beginTask("", 1000);
    SubProgressMonitor spm2 = new SubProgressMonitor(spm, 1000);

    // Test that changes at the root propogate to the child
    root.setCanceled(true);
    Assert.assertTrue(spm2.isCanceled());
    root.setCanceled(false);
    Assert.assertFalse(spm2.isCanceled());

    // Test that changes to the child propogate to the root
    spm2.setCanceled(true);
    Assert.assertTrue(root.isCanceled());
    spm2.setCanceled(false);
    Assert.assertFalse(root.isCanceled());
  }