### Question:
SequencerPathExpression implements Serializable { public static final SequencerPathExpression compile( String expression ) throws InvalidSequencerPathExpression { CheckArg.isNotNull(expression, "sequencer path expression"); expression = expression.trim(); if (expression.length() == 0) { throw new InvalidSequencerPathExpression(RepositoryI18n.pathExpressionMayNotBeBlank.text()); } java.util.regex.Matcher matcher = TWO_PART_PATTERN.matcher(expression); if (!matcher.matches()) { throw new InvalidSequencerPathExpression(RepositoryI18n.pathExpressionIsInvalid.text(expression)); } String selectExpression = matcher.group(1); String outputExpression = matcher.group(2); return new SequencerPathExpression(PathExpression.compile(selectExpression), outputExpression); } protected  SequencerPathExpression( PathExpression selectExpression,
                                       String outputExpression ); static final SequencerPathExpression compile( String expression ); String getSelectExpression(); String getOutputExpression(); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString(); Matcher matcher( String absolutePath );  }### Answer:
@Test( expected = IllegalArgumentException.class ) public void shouldNotCompileNullExpression() { SequencerPathExpression.compile(null); }
@Test( expected = InvalidSequencerPathExpression.class ) public void shouldNotCompileZeroLengthExpression() { SequencerPathExpression.compile(""); }
@Test( expected = InvalidSequencerPathExpression.class ) public void shouldNotCompileBlankExpression() { SequencerPathExpression.compile(" "); }
@Test( expected = InvalidSequencerPathExpression.class ) public void shouldNotCompileExpressionWithSelectionExpressionAndDelimiterAndNoOutputExpression() { SequencerPathExpression.compile("/a/b/c=>"); }
@Test public void shouldCompileExpressionWithIndexes() { assertThat(SequencerPathExpression.compile("/a/b[0]/c[1]/d/e"), is(notNullValue())); assertThat(SequencerPathExpression.compile("/a/b[0]/c[1]/d/e[2]"), is(notNullValue())); }