public PolicyGenerator(Configuration conf, GPGContext context) {
    setConf(conf);
    init(context);
  }
@Test
  public void testPolicyGenerator() throws YarnException {
    policyGenerator = new TestablePolicyGenerator();
    policyGenerator.setPolicy(mock(GlobalPolicy.class));
    policyGenerator.run();
    verify(policyGenerator.getPolicy(), times(1))
        .updatePolicy("default", clusterInfos, null);
    verify(policyGenerator.getPolicy(), times(1))
        .updatePolicy("default2", clusterInfos, null);
  }