public static java.util.Date toLogical(Schema schema, int value) {
        if (!(LOGICAL_NAME.equals(schema.name())))
            throw new DataException("Requested conversion of Date object but the schema does not match.");
        if (value  < 0 || value > MILLIS_PER_DAY)
            throw new DataException("Time values must use number of milliseconds greater than 0 and less than 86400000");
        return new java.util.Date(value);
    }
@Test
    public void testToLogical() {
        assertEquals(EPOCH.getTime(), Time.toLogical(Time.SCHEMA, 0));
        assertEquals(EPOCH_PLUS_TEN_THOUSAND_MILLIS.getTime(), Time.toLogical(Time.SCHEMA, 10000));
    }