### Question:
DMNParseServiceImpl implements DMNParseService { @Override public RangeValue parseRangeValue(final String source) { final FEEL_1_1Parser parser = makeParser(source); final BaseNode baseNode = makeVisitor().visit(parser.expression()); final RangeValue rangeValue = new RangeValue(); if (baseNode instanceof RangeNode) { final RangeNode rangeNode = (RangeNode) baseNode; rangeValue.setStartValue(parseRangeValue(rangeNode.getStart())); rangeValue.setIncludeStartValue(rangeNode.getLowerBound() == RangeNode.IntervalBoundary.CLOSED); rangeValue.setEndValue(parseRangeValue(rangeNode.getEnd())); rangeValue.setIncludeEndValue(rangeNode.getUpperBound() == RangeNode.IntervalBoundary.CLOSED); } return rangeValue; }  @Override List<String> parseFEELList(final String source); @Override RangeValue parseRangeValue(final String source);  }### Answer:
@Test public void testParseRange() { final RangeValue rangeValue = service.parseRangeValue("[1..2]"); assertTrue(rangeValue.getIncludeStartValue()); assertTrue(rangeValue.getIncludeEndValue()); assertEquals("1", rangeValue.getStartValue()); assertEquals("2", rangeValue.getEndValue()); }
@Test public void testParseString() { final RangeValue rangeValue = service.parseRangeValue("[abc..def]"); assertTrue(rangeValue.getIncludeStartValue()); assertTrue(rangeValue.getIncludeEndValue()); assertEquals("abc", rangeValue.getStartValue()); assertEquals("def", rangeValue.getEndValue()); }
@Test public void testParseStringWithDots() { final RangeValue rangeValue = service.parseRangeValue("[\"abc..\"..\"d..ef\"]"); assertTrue(rangeValue.getIncludeStartValue()); assertTrue(rangeValue.getIncludeEndValue()); assertEquals("\"abc..\"", rangeValue.getStartValue()); assertEquals("\"d..ef\"", rangeValue.getEndValue()); }
@Test public void testParseFunctionInvocation() { final RangeValue rangeValue = service.parseRangeValue("[ date ( \"2018-01-01\" ) .. date( \"2018-02-02\" ) ]"); assertEquals("date(\"2018-01-01\")", rangeValue.getStartValue()); assertEquals("date(\"2018-02-02\")", rangeValue.getEndValue()); }
@Test public void testParseFunctionInvocation_MissingEnd() { final RangeValue rangeValue = service.parseRangeValue("[date(\"2018-01-01\")..]"); assertNotNull(rangeValue); assertEquals("", rangeValue.getStartValue()); assertEquals("", rangeValue.getEndValue()); }
@Test public void testParseWithInteger() { final RangeValue rangeValue = service.parseRangeValue("[0..5]"); assertTrue(rangeValue.getIncludeStartValue()); assertTrue(rangeValue.getIncludeEndValue()); assertEquals("0", rangeValue.getStartValue()); assertEquals("5", rangeValue.getEndValue()); }
@Test public void testParseExcludeStart() { final RangeValue rangeValue = service.parseRangeValue("(0..5]"); assertFalse(rangeValue.getIncludeStartValue()); }
@Test public void testParseExcludeEnd() { final RangeValue rangeValue = service.parseRangeValue("[0..5)"); assertFalse(rangeValue.getIncludeEndValue()); }