### Question:
Hour extends RegularTimePeriod implements Serializable { @Override public int hashCode() { int result = 17; result = 37 * result + this.hour; result = 37 * result + this.day.hashCode(); return result; } Hour();  Hour(int hour, Day day);  Hour(int hour, int day, int month, int year);  Hour(Date time);  Hour(Date time, TimeZone zone, Locale locale); int getHour(); Day getDay(); int getYear(); int getMonth(); int getDayOfMonth(); @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 boolean equals(Object obj); @Override String toString(); @Override int hashCode(); @Override int compareTo(TimePeriod o1); static Hour parseHour(String s); static final int FIRST_HOUR_IN_DAY; static final int LAST_HOUR_IN_DAY; }### Answer:
@Test public void testHashcode() { Hour h1 = new Hour(7, 9, 10, 1999); Hour h2 = new Hour(7, 9, 10, 1999); assertEquals(h1, h2); int hash1 = h1.hashCode(); int hash2 = h2.hashCode(); assertEquals(hash1, hash2); }