    @Test
    public void testFormatForPrecision() {

        PointInTime t = new PointInTime(1975, 7, 23, 10, 23, 55, 123);
        Assert.assertEquals("1975", HL7DateTimeFormat.forPrecision(Precision.YEAR).print(t));
        Assert.assertEquals("197507", HL7DateTimeFormat.forPrecision(Precision.MONTH).print(t));
        Assert.assertEquals("19750723", HL7DateTimeFormat.forPrecision(Precision.DATE).print(t));
        Assert.assertEquals("1975072310", HL7DateTimeFormat.forPrecision(Precision.HOUR).print(t));
        Assert.assertEquals("197507231023", HL7DateTimeFormat.forPrecision(Precision.MINUTE).print(t));
        Assert.assertEquals("19750723102355", HL7DateTimeFormat.forPrecision(Precision.SECOND).print(t));
        Assert.assertEquals("19750723102355.123", HL7DateTimeFormat.forPrecision(Precision.MILLISECOND).print(t));
    }