@@ -0,0 +1,2093 @@
+package net.time4j;%0A%0Aimport net.time4j.scale.TimeScale;%0A%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.junit.runners.JUnit4;%0A%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0A%0A@RunWith(JUnit4.class)%0Apublic class TemporalTypeTest %7B%0A%0A    static %7B%0A        System.setProperty(%22net.time4j.sql.utc.conversion%22, %22true%22);%0A    %7D%0A%0A    @Test%0A    public void roundTripSQLDate() %7B%0A        assertThat(%0A            TemporalType.SQL_DATE.toTime4J(new java.sql.Date(86400 * 1000L)),%0A            is(PlainDate.of(1970, 1, 2)));%0A        assertThat(%0A            TemporalType.SQL_DATE.fromTime4J(PlainDate.of(1970, 1, 2)),%0A            is(new java.sql.Date(86400 * 1000L)));%0A    %7D%0A%0A    @Test%0A    public void roundTripSQLTime() %7B%0A        assertThat(%0A            TemporalType.SQL_TIME.toTime4J(%0A                new java.sql.Time(86400 * 1000L - 1)),%0A            is(PlainTime.of(23, 59, 59, 999000000)));%0A        assertThat(%0A            TemporalType.SQL_TIME.fromTime4J(%0A                PlainTime.of(23, 59, 59, 999000000)),%0A            is(new java.sql.Time(86400 * 1000L - 1)));%0A    %7D%0A%0A    @Test%0A    public void roundTripSQLTimestamp() %7B%0A        java.sql.Timestamp ts =%0A            new java.sql.Timestamp(1341100800L * 1000);%0A        ts.setNanos(210);%0A        assertThat(%0A            TemporalType.SQL_TIMESTAMP.toTime4J(ts),%0A            is(%0A                PlainTimestamp.of(2012, 7, 1, 0, 0, 0)%0A                .plus(210, ClockUnit.NANOS)));%0A        assertThat(%0A            TemporalType.SQL_TIMESTAMP.fromTime4J(%0A                PlainTimestamp.of(2012, 7, 1, 0, 0, 0)%0A                .plus(210, ClockUnit.NANOS)),%0A            is(ts));%0A    %7D%0A%0A    @Test%0A    public void roundTripJavaUtilDate() %7B%0A        java.util.Date jud = new java.util.Date(1341100800L * 1000);%0A        assertThat(%0A            TemporalType.JAVA_UTIL_DATE.toTime4J(jud),%0A            is(Moment.of(1341100800L, TimeScale.POSIX)));%0A        assertThat(%0A            TemporalType.JAVA_UTIL_DATE.fromTime4J(%0A                Moment.of(1341100800L, TimeScale.POSIX)),%0A            is(jud));%0A    %7D%0A%0A%7D%0A

test for new class TemporalType