### Question:
Week extends RegularTimePeriod implements Serializable { public int getWeek() { return this.week; } Week();  Week(int week, int year);  Week(int week, Year year);  Week(Date time);  Week(Date time, TimeZone zone, Locale locale); Year getYear(); int getYearValue(); int getWeek(); @Override long getFirstMillisecond(); @Override long getLastMillisecond(); @Override void peg(Calendar calendar); @Override RegularTimePeriod previous(); @Override RegularTimePeriod next(); @Override long getSerialIndex(); @Override long getFirstMillisecond(Calendar calendar); @Override long getLastMillisecond(Calendar calendar); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); @Override int compareTo(TimePeriod o1); static Week parseWeek(String s); static final int FIRST_WEEK_IN_YEAR; static final int LAST_WEEK_IN_YEAR; }### Answer:
@Test public void testConstructor() { Locale savedLocale = Locale.getDefault(); TimeZone savedZone = TimeZone.getDefault(); Locale.setDefault(new Locale("da", "DK")); TimeZone.setDefault(TimeZone.getTimeZone("Europe/Copenhagen")); GregorianCalendar cal = (GregorianCalendar) Calendar.getInstance( TimeZone.getDefault(), Locale.getDefault()); assertEquals(Calendar.MONDAY, cal.getFirstDayOfWeek()); cal.set(2007, Calendar.AUGUST, 26, 1, 0, 0); cal.set(Calendar.MILLISECOND, 0); Date t = cal.getTime(); Week w = new Week(t, TimeZone.getTimeZone("Europe/Copenhagen"), Locale.getDefault()); assertEquals(34, w.getWeek()); Locale.setDefault(Locale.US); TimeZone.setDefault(TimeZone.getTimeZone("US/Detroit")); cal = (GregorianCalendar) Calendar.getInstance(TimeZone.getDefault()); assertEquals(Calendar.SUNDAY, cal.getFirstDayOfWeek()); cal.set(2007, Calendar.AUGUST, 26, 1, 0, 0); cal.set(Calendar.MILLISECOND, 0); t = cal.getTime(); w = new Week(t, TimeZone.getTimeZone("Europe/Copenhagen"), Locale.getDefault()); assertEquals(35, w.getWeek()); w = new Week(t, TimeZone.getTimeZone("Europe/Copenhagen"), new Locale("da", "DK")); assertEquals(34, w.getWeek()); Locale.setDefault(savedLocale); TimeZone.setDefault(savedZone); }