@Test
public void testCreateDate() {

    GregorianCalendar cal_target = new GregorianCalendar();
    cal_target.set(2004, Calendar.JUNE, 30, 0, 0, 00);
    cal_target.set(Calendar.MILLISECOND, 0);
    Date date = TimestampWithTimezone.createDate(cal_target);
    Calendar cal = Calendar.getInstance();
    cal.setTimeInMillis(date.getTime());
    assertThat(cal.get(Calendar.HOUR_OF_DAY), is(0));
    assertThat(cal.get(Calendar.MINUTE), is(0));
    assertThat(cal.get(Calendar.SECOND), is(0));
    assertThat(cal.get(Calendar.MILLISECOND), is(0));
    assertThat(cal.get(Calendar.YEAR), is(2004));
    assertThat(cal.get(Calendar.MONTH), is(Calendar.JUNE));
    assertThat(cal.get(Calendar.DATE), is(30));
}