RejectAMRMProxyPolicy extends AbstractAMRMProxyPolicy { @Override public Map<SubClusterId, List<ResourceRequest>> splitResourceRequests( List<ResourceRequest> resourceRequests, Set<SubClusterId> timedOutSubClusters) throws YarnException { throw new FederationPolicyException("The policy configured for this queue " + "rejects all routing requests by construction."); }  @Override void reinitialize(FederationPolicyInitializationContext policyContext); @Override Map<SubClusterId, List<ResourceRequest>> splitResourceRequests(
      List<ResourceRequest> resourceRequests,
      Set<SubClusterId> timedOutSubClusters);  }
@Test (expected = FederationPolicyException.class) public void testSplitAllocateRequest() throws Exception { String[] hosts = new String[] {"host1", "host2" }; List<ResourceRequest> resourceRequests = FederationPoliciesTestUtil .createResourceRequests(hosts, 2 * 1024, 2, 1, 3, null, false); Map<SubClusterId, List<ResourceRequest>> response = ((FederationAMRMProxyPolicy) getPolicy()).splitResourceRequests( resourceRequests, new HashSet<SubClusterId>()); }