@Test
public void readWriteReadAgain() {

	File file = new File("test.toml");
	CommentedConfig parsed = new TomlParser().parse(file, FileNotFoundAction.THROW_ERROR);
	System.out.println("--- parsed --- \n" + parsed);
	System.out.println("--------------------------------------------");
	assertNull(parsed.getComment("without_comment"));
	assertNotNull(parsed.getComment("with_comments"));
	assertTrue(parsed.getComment("with_comments").contains("\n"));
	assertEquals(TestEnum.A, parsed.getEnum("enum", TestEnum.class));
	java.io.StringWriter sw = new StringWriter();
	TomlWriter writer = new TomlWriter();
	writer.write(parsed, sw);
	System.out.println("--- written --- \n" + sw);
	System.out.println("--------------------------------------------");
	CommentedConfig reparsed = new TomlParser().parse(new StringReader(sw.toString()));
	System.out.println("--- reparsed --- \n" + reparsed);
	assertEquals(parsed, reparsed);
}