* Tests that the search integer is found where expected.
* ((15, 40, 25, 40, 10), 40)
*/
public void testIntegerSequence() throws Exception {
ExpressionContext context = createExpressionContext();
ExpressionFactory factory = context.getFactory();
Function indexOf = new IndexOfFunction();
Sequence sequence = createIntegerSequence(factory,
new int[]{15, 40, 25, 40, 10});
Value search = factory.createIntValue(40);
Value retVal = indexOf.invoke(context, new Value[]{sequence, search});
final Sequence retSeq = retVal.getSequence();
// Should have returned (2, 4)