@Test
public void testNodeNotExists() throws YarnException {

  List<ResourceRequest> requests = new ArrayList<ResourceRequest>();
  boolean relaxLocality = true;
  requests.add(ResourceRequest
      .newInstance(Priority.UNDEFINED, "node5", Resource.newInstance(10, 1),
          1, relaxLocality));
  requests.add(ResourceRequest
      .newInstance(Priority.UNDEFINED, "rack1", Resource.newInstance(10, 1),
          1));
  requests.add(ResourceRequest
      .newInstance(Priority.UNDEFINED, ResourceRequest.ANY,
          Resource.newInstance(10, 1), 1));
  ApplicationSubmissionContext asc = ApplicationSubmissionContext
      .newInstance(null, null, null, null, null, false, false, 0,
          Resources.none(), null, false, null, null);
  asc.setAMContainerResourceRequests(requests);
  try {
    ((FederationRouterPolicy) getPolicy()).getHomeSubcluster(asc, null);
  } catch (FederationPolicyException e) {
    Assert.fail();
  }
}