### Question:
PathExpression implements Serializable { public static final PathExpression compile( String expression ) throws InvalidPathExpressionException { return new PathExpression(expression); } PathExpression( String expression ); static final PathExpression compile( String expression ); String getExpression(); String getSelectExpression(); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString(); Matcher matcher( String absolutePath ); boolean matchesAnything(); static PathExpression all(); static RepositoryPath parseRepositoryPath( String path );  }### Answer:
@Test( expected = IllegalArgumentException.class ) public void shouldNotCompileNullExpression() { PathExpression.compile(null); }
@Test( expected = InvalidPathExpressionException.class ) public void shouldNotCompileZeroLengthExpression() { PathExpression.compile(""); }
@Test( expected = InvalidPathExpressionException.class ) public void shouldNotCompileBlankExpression() { PathExpression.compile(" "); }
@Test public void shouldCompileExpressionWithIndexes() { assertThat(PathExpression.compile("/a/b[0]/c[1]/d/e"), is(notNullValue())); assertThat(PathExpression.compile("/a/b[0]/c[1]/d/e[2]"), is(notNullValue())); }
@Test public void shouldCompileExpressionWithRepositoryAndWorkspaceNames() { assertThat(PathExpression.compile("repo:ws:/a/b/c"), is(notNullValue())); }
@Test public void shouldCompileExpressionWithRepositoryAndNoWorkspaceNames() { assertThat(PathExpression.compile("repo::/a/b/c"), is(notNullValue())); }
@Test public void shouldCompileExpressionWithNoRepositoryAndNoWorkspaceNames() { assertThat(PathExpression.compile("::/a/b/c"), is(notNullValue())); }