public void testWriteData() throws Exception {
File destFile = folder.newFile("jacoco.exec");
AgentOptions options = new AgentOptions();
options.setDestfile(destFile.getAbsolutePath());
FileOutput controller = new FileOutput();
controller.startup(options, new RuntimeData());
controller.writeExecutionData(false);
controller.shutdown();
assertTrue("Execution data file should be created", destFile.exists());
assertTrue("Execution data file should have contents",
destFile.length() > 0);
}