### Question:
InlineParser { List<String> splitWithInlineExpression() { List<String> result = new ArrayList<>(); StringBuilder segment = new StringBuilder(); int bracketsDepth = 0; for (int i = 0; i < inlineExpression.length(); i++) { char each = inlineExpression.charAt(i); switch (each) { case SPLITTER: if (bracketsDepth > 0) { segment.append(each); } else { result.add(segment.toString().trim()); segment.setLength(0); } break; case '$': if ('{' == inlineExpression.charAt(i + 1)) { bracketsDepth++; } segment.append(each); break; case '}': if (bracketsDepth > 0) { bracketsDepth--; } segment.append(each); break; default: segment.append(each); break; } } if (segment.length() > 0) { result.add(segment.toString().trim()); } return result; }  List<String> split(); List<String> evaluate();  }### Answer:
@Test public void testSplitWithInlineExpressionForOneRegularValue() { assertThat(new InlineParser("order").splitWithInlineExpression(), is(Collections.singletonList("order"))); }
@Test public void testSplitWithInlineExpressionForOneInlineValue() { assertThat(new InlineParser("order_${0..7}").splitWithInlineExpression(), is(Collections.singletonList("order_${0..7}"))); }
@Test public void testSplitWithInlineExpressionForRegularValuesWithSpace() { assertThat(new InlineParser(" order , order_item ").splitWithInlineExpression(), is(Arrays.asList("order", "order_item"))); }
@Test public void testSplitWithInlineExpressionForMixedValuesWithSpace() { assertThat(new InlineParser(" order , order_item_${0..7} ").splitWithInlineExpression(), is(Arrays.asList("order", "order_item_${0..7}"))); }
@Test public void testSplitWithInlineExpressionForMixedValuesAndWithCommaAtInlineExpression() { assertThat(new InlineParser(" order , order_item_${0, 2, 4} ").splitWithInlineExpression(), is(Arrays.asList("order", "order_item_${0, 2, 4}"))); }
@Test public void testSplitWithInlineExpressionForMixedValuesAndNestedInlineExpression() { assertThat(new InlineParser(" order , order_item_${0, ${1..7}} ").splitWithInlineExpression(), is(Arrays.asList("order", "order_item_${0, ${1..7}}"))); }
@Test public void testSplitWithInlineExpressionForValuesNotInlineExpression() { assertThat(new InlineParser(" order , order_item_$ {0, 1} ").splitWithInlineExpression(), is(Arrays.asList("order", "order_item_$ {0", "1}"))); }