public void testOverlappingStartRange() throws Exception {
Sequence sequence = factory.createSequence(flintstoneAndRubbleItems);
Function function = new SubsequenceFunction();
Value result;
result = invokeSubsequence(function, sequence, -2, 6);
Sequence subsequence = result.getSequence();
assertEquals(subsequence.getLength(), 3);
assertSame(flintstoneAndRubbleItems[0], subsequence.getItem(1));
assertSame(flintstoneAndRubbleItems[1], subsequence.getItem(2));
assertSame(flintstoneAndRubbleItems[2], subsequence.getItem(3));
}