@Test
public void testDynamicInputChunkContext() throws IOException {

  Configuration configuration = new Configuration();
  configuration.set(DistCpConstants.CONF_LABEL_LISTING_FILE_PATH,
      "/tmp/test/file1.seq");
  DynamicInputFormat firstInputFormat = new DynamicInputFormat();
  DynamicInputFormat secondInputFormat = new DynamicInputFormat();
  DynamicInputChunkContext firstContext =
      firstInputFormat.getChunkContext(configuration);
  DynamicInputChunkContext secondContext =
      firstInputFormat.getChunkContext(configuration);
  DynamicInputChunkContext thirdContext =
      secondInputFormat.getChunkContext(configuration);
  DynamicInputChunkContext fourthContext =
      secondInputFormat.getChunkContext(configuration);
  Assert.assertTrue("Chunk contexts from the same DynamicInputFormat " +
      "object should be the same.",firstContext.equals(secondContext));
  Assert.assertTrue("Chunk contexts from the same DynamicInputFormat " +
      "object should be the same.",thirdContext.equals(fourthContext));
  Assert.assertTrue("Contexts from different DynamicInputFormat " +
      "objects should be different.",!firstContext.equals(thirdContext));
}