@Test
public void testTransientAndLargeShuffleCombination() throws Exception {

  final List<CompileTimePass> compileTimePasses = new ArrayList<>();
  final Set<RunTimePass<?>> runTimePasses = new HashSet<>();
  compileTimePasses.addAll(LargeShufflePolicy.BUILDER.getCompileTimePasses());
  runTimePasses.addAll(LargeShufflePolicy.BUILDER.getRunTimePasses());
  compileTimePasses.addAll(TransientResourcePolicy.BUILDER.getCompileTimePasses());
  runTimePasses.addAll(TransientResourcePolicy.BUILDER.getRunTimePasses());
  final Policy combinedPolicy = new PolicyImpl(compileTimePasses, runTimePasses);
  // This should NOT throw an exception and work well together.
  final IRDAG optimizedDAG =
    combinedPolicy.runCompileTimeOptimization(dag, DAG.EMPTY_DAG_DIRECTORY);
  assertTrue(optimizedDAG.checkIntegrity().isPassed());
}