@Test
public void testSplitAllocateRequest() throws YarnException {

  // Verify the request only goes to the home subcluster
  String[] hosts = new String[] {"host0", "host1", "host2", "host3"};
  List<ResourceRequest> resourceRequests = createResourceRequests(
      hosts, 2 * 1024, 2, 1, 3, null, false);
  HomeAMRMProxyPolicy federationPolicy =
      (HomeAMRMProxyPolicy) getPolicy();
  Map<SubClusterId, List<ResourceRequest>> response = federationPolicy
      .splitResourceRequests(resourceRequests, new HashSet<SubClusterId>());
  assertEquals(1, response.size());
  assertNotNull(response.get(HOME_SC_ID));
  assertEquals(9, response.get(HOME_SC_ID).size());
}