/**
* Tests a basic segmented timeline.
*/
public void testBasicSegmentedTimeline() {
SegmentedTimeline stl = new SegmentedTimeline(10, 2, 3);
stl.setStartTime(946684800000L); // 1-Jan-2000
assertFalse(stl.containsDomainValue(946684799999L));
assertTrue(stl.containsDomainValue(946684800000L));
assertTrue(stl.containsDomainValue(946684800019L));
assertFalse(stl.containsDomainValue(946684800020L));
assertFalse(stl.containsDomainValue(946684800049L));
assertTrue(stl.containsDomainValue(946684800050L));
assertTrue(stl.containsDomainValue(946684800069L));
assertFalse(stl.containsDomainValue(946684800070L));
assertFalse(stl.containsDomainValue(946684800099L));
assertTrue(stl.containsDomainValue(946684800100L));
assertEquals(0, stl.toTimelineValue(946684800000L));
assertEquals(19, stl.toTimelineValue(946684800019L));
assertEquals(20, stl.toTimelineValue(946684800020L));
assertEquals(20, stl.toTimelineValue(946684800049L));
assertEquals(20, stl.toTimelineValue(946684800050L));
assertEquals(39, stl.toTimelineValue(946684800069L));
assertEquals(40, stl.toTimelineValue(946684800070L));
assertEquals(40, stl.toTimelineValue(946684800099L));
assertEquals(40, stl.toTimelineValue(946684800100L));
assertEquals(946684800000L, stl.toMillisecond(0));
assertEquals(946684800019L, stl.toMillisecond(19));
assertEquals(946684800050L, stl.toMillisecond(20));
assertEquals(946684800069L, stl.toMillisecond(39));
assertEquals(946684800100L, stl.toMillisecond(40));
}