assertEquals(customTimeZone, calendar.getTimeZone());
}
@Test
public void testVisibleDaysOfWeek() {
Calendar calendar = new Calendar();
// The defaults are the whole week
assertEquals(1, calendar.getFirstVisibleDayOfWeek());
assertEquals(7, calendar.getLastVisibleDayOfWeek());
calendar.setFirstVisibleDayOfWeek(0); // Invalid input
assertEquals(1, calendar.getFirstVisibleDayOfWeek());
calendar.setLastVisibleDayOfWeek(0); // Invalid input
assertEquals(7, calendar.getLastVisibleDayOfWeek());
calendar.setFirstVisibleDayOfWeek(8); // Invalid input
assertEquals(1, calendar.getFirstVisibleDayOfWeek());
calendar.setLastVisibleDayOfWeek(8); // Invalid input
assertEquals(7, calendar.getLastVisibleDayOfWeek());
calendar.setFirstVisibleDayOfWeek(4);
assertEquals(4, calendar.getFirstVisibleDayOfWeek());
calendar.setLastVisibleDayOfWeek(6);
assertEquals(6, calendar.getLastVisibleDayOfWeek());
calendar.setFirstVisibleDayOfWeek(7); // Invalid since last day is 6
assertEquals(4, calendar.getFirstVisibleDayOfWeek());
calendar.setLastVisibleDayOfWeek(2); // Invalid since first day is 4
assertEquals(6, calendar.getLastVisibleDayOfWeek());
}