// Path: src/main/java/com/orgzly/org/parser/OrgParsedFile.java
// public class OrgParsedFile { // TODO: Extend OrgFile instead?
//     private OrgFile file;
// 
//     private List<OrgNodeInList> headsInList;
// 
//     public OrgParsedFile() {
//         headsInList = new ArrayList<>();
//     }
// 
//     public OrgFile getFile() {
//         return file;
//     }
// 
//     public void setFile(OrgFile file) {
//         this.file = file;
//     }
// 
//     public List<OrgNodeInList> getHeadsInList() {
//         return headsInList;
//     }
// 
//     public void addHead(OrgNodeInList nodeInList) {
//         headsInList.add(nodeInList);
//     }
// 
//     public String toString() {
//         return toString(OrgParserSettings.getBasic());
//     }
// 
//     public String toString(OrgParserSettings settings) {
//         StringBuilder str = new StringBuilder();
// 
//         OrgParserWriter parserWriter = new OrgParserWriter(settings);
// 
//         str.append(parserWriter.whiteSpacedFilePreface(file.getPreface()));
// 
//         for (OrgNodeInList nodeInList : headsInList) {
//             str.append(parserWriter.whiteSpacedHead(nodeInList, file.getSettings().isIndented()));
//         }
// 
//         return str.toString();
//     }
// }


import com.orgzly.org.parser.OrgParsedFile;
import org.junit.Assert;
import org.junit.Test;
import java.io.IOException;
        Assert.assertEquals("BAR", properties.getAll().get(0).getValue());
        Assert.assertEquals("LAST_REPEAT", properties.getAll().get(1).getName());
        Assert.assertEquals("[2009-10-19 Mon 00:40]", properties.getAll().get(1).getValue());
    }

    @Test
    public void setReplacesExistingValue() {
        OrgProperties properties = new OrgProperties();

        properties.put("LAST_REPEAT", "[2009-10-19 Mon 00:30]");
        properties.put("LAST_REPEAT", "[2009-10-19 Mon 00:35]");
        properties.put("FOO", "BAR");
        properties.set("LAST_REPEAT", "[2009-10-19 Mon 00:40]");

        Assert.assertEquals(2, properties.size());
        Assert.assertEquals("LAST_REPEAT", properties.getAll().get(0).getName());
        Assert.assertEquals("[2009-10-19 Mon 00:40]", properties.getAll().get(0).getValue());
        Assert.assertEquals("FOO", properties.getAll().get(1).getName());
        Assert.assertEquals("BAR", properties.getAll().get(1).getValue());
    }

    @Test
    public void indented() throws IOException {
        String fileContent =
                "** TODO Note\n" +
                        ":PROPERTIES:\n" +
                        "   :STYLE:    habit\n" +
                        "   :LAST_REPEAT: [2009-10-19 Mon 00:36]\n" +
                        "   :END:";

// Path: src/main/java/com/orgzly/org/parser/OrgParsedFile.java
// public class OrgParsedFile { // TODO: Extend OrgFile instead?
//     private OrgFile file;
// 
//     private List<OrgNodeInList> headsInList;
// 
//     public OrgParsedFile() {
//         headsInList = new ArrayList<>();
//     }
// 
//     public OrgFile getFile() {
//         return file;
//     }
// 
//     public void setFile(OrgFile file) {
//         this.file = file;
//     }
// 
//     public List<OrgNodeInList> getHeadsInList() {
//         return headsInList;
//     }
// 
//     public void addHead(OrgNodeInList nodeInList) {
//         headsInList.add(nodeInList);
//     }
// 
//     public String toString() {
//         return toString(OrgParserSettings.getBasic());
//     }
// 
//     public String toString(OrgParserSettings settings) {
//         StringBuilder str = new StringBuilder();
// 
//         OrgParserWriter parserWriter = new OrgParserWriter(settings);
// 
//         str.append(parserWriter.whiteSpacedFilePreface(file.getPreface()));
// 
//         for (OrgNodeInList nodeInList : headsInList) {
//             str.append(parserWriter.whiteSpacedHead(nodeInList, file.getSettings().isIndented()));
//         }
// 
//         return str.toString();
//     }
// }


// Path: src/test/java/com/orgzly/org/OrgPropertiesTest.java
import com.orgzly.org.parser.OrgParsedFile;
import org.junit.Assert;
import org.junit.Test;
import java.io.IOException;

        Assert.assertEquals("BAR", properties.getAll().get(0).getValue());
        Assert.assertEquals("LAST_REPEAT", properties.getAll().get(1).getName());
        Assert.assertEquals("[2009-10-19 Mon 00:40]", properties.getAll().get(1).getValue());
    }

    @Test
    public void setReplacesExistingValue() {
        OrgProperties properties = new OrgProperties();

        properties.put("LAST_REPEAT", "[2009-10-19 Mon 00:30]");
        properties.put("LAST_REPEAT", "[2009-10-19 Mon 00:35]");
        properties.put("FOO", "BAR");
        properties.set("LAST_REPEAT", "[2009-10-19 Mon 00:40]");

        Assert.assertEquals(2, properties.size());
        Assert.assertEquals("LAST_REPEAT", properties.getAll().get(0).getName());
        Assert.assertEquals("[2009-10-19 Mon 00:40]", properties.getAll().get(0).getValue());
        Assert.assertEquals("FOO", properties.getAll().get(1).getName());
        Assert.assertEquals("BAR", properties.getAll().get(1).getValue());
    }

    @Test
    public void indented() throws IOException {
        String fileContent =
                "** TODO Note\n" +
                        ":PROPERTIES:\n" +
                        "   :STYLE:    habit\n" +
                        "   :LAST_REPEAT: [2009-10-19 Mon 00:36]\n" +
                        "   :END:";

        OrgParsedFile file = parserBuilder.setInput(fileContent).build().parse();