@Test
public void testWriteAck() throws IOException {

    final MetadataHandler handler = MetadataHandler.getInstance();
    final File file = temp.newFile("ackfile");
    handler.writeAck(file, "id");
    Assert.assertTrue(file.exists());
    final BufferedReader reader = new BufferedReader(
        new FileReader(file.getAbsolutePath() + MetadataHandler.METADATA_FILE_SUFFIX));
    String line = reader.readLine();
    Assert.assertEquals("File content is not correct.", "id", line);
    reader.close();
}