### Question:
Week extends RegularTimePeriod implements Serializable { @Override public boolean equals(Object obj) { if (obj == this) { return true; } if (!(obj instanceof Week)) { return false; } Week that = (Week) obj; if (this.week != that.week) { return false; } if (this.year != that.year) { return false; } return true; } 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 testEquals() { Week w1 = new Week(1, 2002); Week w2 = new Week(1, 2002); assertEquals(w1, w2); assertEquals(w2, w1); w1 = new Week(2, 2002); assertFalse(w1.equals(w2)); w2 = new Week(2, 2002); assertEquals(w1, w2); w1 = new Week(2, 2003); assertFalse(w1.equals(w2)); w2 = new Week(2, 2003); assertEquals(w1, w2); }