tests for startAt and endAt