@Test (timeout = 30000)
public void testCopyMergeSingleDirectory() throws IOException {

  setupDirs();
  boolean copyMergeResult = copyMerge("partitioned", "tmp/merged");
  Assert.assertTrue("Expected successful copyMerge result.", copyMergeResult);
  File merged = new File(TEST_DIR, "tmp/merged");
  Assert.assertTrue("File tmp/merged must exist after copyMerge.",
      merged.exists());
  BufferedReader rdr = new BufferedReader(new FileReader(merged));
  try {
    Assert.assertEquals("Line 1 of merged file must contain \"foo\".",
        "foo", rdr.readLine());
    Assert.assertEquals("Line 2 of merged file must contain \"bar\".",
        "bar", rdr.readLine());
    Assert.assertNull("Expected end of file reading merged file.",
        rdr.readLine());
  }
  finally {
    rdr.close();
  }
}