public class DateTest {
@Test
public void testDate() {
TimeZone.setDefault(TimeZone.getTimeZone("Europe/Berlin"));
Date d = new Date(2011, 10, 10, 17, 10, 0, 0);
assertEquals(10, (int) d.getDate());
assertEquals(17, (int) d.getHours());
assertEquals(16, (int) d.getUTCHours());
d.setHours(18);
assertEquals(18, (int) d.getHours());
assertEquals(17, (int) d.getUTCHours());
d.setUTCHours(18);
assertEquals(19, (int) d.getHours());
assertEquals(18, (int) d.getUTCHours());
}