public void testSubList(){
  Range range=createRange(0,5);
  List subList=range.subList(2,4);
  assertEquals("size",2,subList.size());
  assertTrue("sublist not a range",subList instanceof Range);
  Range subListRange=(Range)subList;
  assertEquals("from",createValue(2),subListRange.getFrom());
  assertEquals("to",createValue(3),subListRange.getTo());
  subList=range.subList(0,6);
  assertEquals("size",6,subList.size());
  assertTrue("sublist not a range",subList instanceof Range);
  subListRange=(Range)subList;
  assertEquals("from",createValue(0),subListRange.getFrom());
  assertEquals("to",createValue(5),subListRange.getTo());
}

public void testSubList ( ) { Range range = createRange ( 0 , 5 ) ; List subList = range . subList ( 2 , 4 ) ; assertEquals ( "size" , 2 , subList . size ( ) ) ; assertTrue ( "sublist not a range" , subList instanceof Range ) ; Range subListRange = ( Range ) subList ; assertEquals ( "from" , createValue ( 2 ) , subListRange . getFrom ( ) ) ; assertEquals ( "to" , createValue ( 3 ) , subListRange . getTo ( ) ) ; subList = range . subList ( 0 , 6 ) ; assertEquals ( "size" , 6 , subList . size ( ) ) ; assertTrue ( "sublist not a range" , subList instanceof Range ) ; subListRange = ( Range ) subList ; assertEquals ( "from" , createValue ( 0 ) , subListRange . getFrom ( ) ) ; assertEquals ( "to" , createValue ( 5 ) , subListRange . getTo ( ) ) ; }
tests getting a sub list .
