@Test
public void testGetAllocationFileFromClasspath() {

  try {
    FileSystem fs = FileSystem.get(conf);
    conf.set(FairSchedulerConfiguration.ALLOCATION_FILE,
        TEST_FAIRSCHED_XML);
    AllocationFileLoaderService allocLoader =
        new AllocationFileLoaderService(scheduler);
    Path allocationFile = allocLoader.getAllocationFile(conf);
    assertEquals(TEST_FAIRSCHED_XML, allocationFile.getName());
    assertTrue(fs.exists(allocationFile));
  } catch (IOException e) {
    fail("Unable to access allocation file from classpath: " + e);
  }
}