@@ -0,0 +1,1710 @@
+//@@author A0138493W%0Apackage utask.logic.parser;%0A%0Aimport static org.junit.Assert.assertEquals;%0Aimport static org.junit.Assert.assertFalse;%0Aimport static org.junit.Assert.assertTrue;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.List;%0Aimport java.util.Optional;%0A%0Aimport org.junit.Test;%0A%0Apublic class ParserUtilTest %7B%0A%0A    @Test%0A    public void parse_index() %7B%0A        Optional%3CInteger%3E index = ParserUtil.parseIndex(%22 %22);%0A        assertTrue (!index.isPresent());%0A%0A        index = ParserUtil.parseIndex(%22%25%22);%0A        assertTrue (!index.isPresent());%0A%0A        index = ParserUtil.parseIndex(%22abc%22);%0A        assertTrue (!index.isPresent());%0A%0A        index = ParserUtil.parseIndex(%2216%22);%0A        assertFalse (!index.isPresent());%0A%0A    %7D%0A%0A    @Test%0A    public void parse_multiple_indexes() %7B%0A        Optional%3CList%3CInteger%3E%3E indexList = ParserUtil.parseMultiIndex(%22 %22);%0A        assertTrue (!indexList.isPresent());%0A%0A        indexList = ParserUtil.parseMultiIndex(%22 , 1%22);%0A        assertTrue (!indexList.isPresent());%0A%0A        indexList = ParserUtil.parseMultiIndex(%221, a%22);%0A        assertTrue (!indexList.isPresent());%0A%0A        indexList = ParserUtil.parseMultiIndex(%221, 2 to c%22);%0A        assertTrue (!indexList.isPresent());%0A%0A        indexList = ParserUtil.parseMultiIndex(%221, 1%22);%0A        assertFalse (!indexList.isPresent());%0A        assertEquals (%221%22, indexList.get().get(0).toString());%0A%0A        indexList = ParserUtil.parseMultiIndex(%22 1, 1 to 3%22);%0A        assertFalse (!indexList.isPresent());%0A        ArrayList%3CInteger%3E expectedList = new ArrayList%3CInteger%3E();%0A        expectedList.add(3);%0A        expectedList.add(2);%0A        expectedList.add(1);%0A        assertEquals (expectedList, indexList.get());%0A    %7D%0A%7D%0A

Add tests for parserutil