Added test for DateTimeProducerImpl
minor refactoring.