@Test(expected = IllegalArgumentException.class)
public void visitUnsupportedSortExpression() {

    // prepare
    final JsonPointer unsupportedProperty = JsonPointer.of("unsupportedExpr");
    final SortOption sortOption = SearchModelFactory.newSortOption(unsupportedProperty,
            SortOptionEntry.SortOrder.ASC);
    when(exprFactoryMock.sortBy(unsupportedProperty.toString()))
            .thenThrow(new IllegalArgumentException("Unsupported expr"));
    // test
    visitor.visitAll(Collections.singletonList(sortOption));
}