/** Tests if empty sequence is returned for empty sequence */
 public void testEmptySequence() throws ExpressionException {
   final Function function = new MaxFunction();
   Value result =
       function.invoke(expressionContextMock, new Value[] {factory.createSequence(new Item[] {})});
   assertTrue(result instanceof Sequence);
   assertEquals(0, result.getSequence().getLength());
 }
 /**
  * Tests on sequence of strings. Values should be compared using Unicode code point collation
  * (http://www.w3.org/2005/xpath-functions/collation/codepoint).
  */
 public void testSequenceOfStrings() throws ExpressionException {
   final Function function = new MaxFunction();
   Value result =
       function.invoke(
           expressionContextMock,
           new Value[] {
             factory.createSequence(
                 new Item[] {
                   factory.createStringValue("qwe"),
                   factory.createStringValue("rty"),
                   factory.createStringValue("asd")
                 })
           });
   assertTrue(result instanceof StringValue);
   assertEquals("rty", result.stringValue().asJavaString());
 }