testLoadMultipleWithErrors() {
    const mm = getModuleManager({'a': [], 'b': [], 'c': []});
    mm.setBatchModeEnabled(true);
    mm.setLoader(createUnsuccessfulLoader(mm, 500));

    let calledBack = false;
    let error = null;
    let calledBack2 = false;
    let error2 = null;
    let calledBack3 = false;
    let error3 = null;

    const dMap = mm.loadMultiple(['a', 'b', 'c']);
    dMap['a'].then(
        (ctx) => {
          calledBack = true;
        },
        (err) => {
          error = err;
        });
    dMap['b'].then(
        (ctx) => {
          calledBack2 = true;
        },
        (err) => {
          error2 = err;
        });
    dMap['c'].then(
        (ctx) => {
          calledBack3 = true;
        },
        (err) => {
          error3 = err;
        });

    assertFalse(calledBack);
    assertFalse(calledBack2);
    assertFalse(calledBack3);

    clock.tick(4);

    // A module request is now underway using the unsuccessful loader.
    // We substitute a successful loader for future module load requests.
    mm.setLoader(createSuccessfulBatchLoader(mm));

    clock.tick(1);

    assertFalse(calledBack);
    assertFalse(calledBack2);
    assertFalse(calledBack3);
    assertFalse('module "a" should not be loaded', mm.isModuleLoaded('a'));
    assertFalse('module "b" should not be loaded', mm.isModuleLoaded('b'));
    assertFalse('module "c" should not be loaded', mm.isModuleLoaded('c'));

    // Retry should happen after a backoff
    clock.tick(5 + mm.getBackOff_());

    assertTrue(calledBack);
    assertFalse(calledBack2);
    assertFalse(calledBack3);
    assertTrue('module "a" should be loaded', mm.isModuleLoaded('a'));
    assertFalse('module "b" should not be loaded', mm.isModuleLoaded('b'));
    assertFalse('module "c" should not be loaded', mm.isModuleLoaded('c'));

    clock.tick(2);
    assertTrue(calledBack2);
    assertFalse(calledBack3);
    assertTrue('module "b" should be loaded', mm.isModuleLoaded('b'));
    assertFalse('module "c" should not be loaded', mm.isModuleLoaded('c'));

    clock.tick(2);
    assertTrue(calledBack3);
    assertTrue('module "c" should be loaded', mm.isModuleLoaded('c'));

    assertNull(error);
    assertNull(error2);
    assertNull(error3);
  }
Tests loading multiple modules by requesting a Deferred object when
a server error occurs.
@suppress {missingProperties} suppression added to enable type checking