testDefine() {
    let result;
    // avoid compiler checks on the use of goog.define by creating a local alias
    const define = goog.define;
    result = define('SOME_DEFINE', 123);  // overridden by 456
    assertEquals(456, result);
    assertEquals('undefined', typeof SOME_DEFINE);

    result = define('SOME_OTHER_DEFINE', 123);  // not overridden
    assertEquals(123, result);
    assertEquals('undefined', typeof SOME_OTHER_DEFINE);

    // alias to avoid the being picked up by the deps scanner.
    const provide = goog.provide;
    provide('ns');

    result = define('ns.SOME_NAMESPACED_DEFINE', 123);  // overridden by 789
    assertEquals(789, result);
    assertEquals('undefined', typeof ns.SOME_NAMESPACED_DEFINE);

    result = define('ns.SOME_OTHER_NAMESPACED_DEFINE', 123);  // untouched
    assertEquals(123, result);
    assertEquals('undefined', typeof ns.SOME_OTHER_NAMESPACED_DEFINE);

    // still works even if namespace not provided.
    result = define('ns2.SOME_UNPROVIDED_DEFINE', 123);  // overridden by 159
    assertEquals(159, result);
    assertEquals('undefined', typeof ns2);

    result = define('ns3.SOME_OTHER_UNPROVIDED_DEFINE', 123);  // untouched
    assertEquals(123, result);
    assertEquals('undefined', typeof ns3);
  }
@suppress {undefinedVars} ns is created indirectly