function assertIntersection(msg, set1, set2, expectedIntersection) {
  assertTrue(
      `${msg}: set1->set2`,
      set1.intersection(set2).equals(expectedIntersection));
  assertTrue(
      `${msg}: set2->set1`,
      set2.intersection(set1).equals(expectedIntersection));
}
Helper function to assert intersection is commutative.