.thenReturn(dtFormat);
ConfigContext.overrideConfig(Thread.currentThread()
.getContextClassLoader(), config);
DateTimeService dtSvc = mock(DateTimeService.class);
SimpleDateFormat sdf = new SimpleDateFormat(dtFormat);
when(dtSvc.toDateTimeString(date)).thenReturn(sdf.format(date));
attributeValueReader.setDateTimeService(dtSvc);
// create allowed formats
List<String> allowedFormats = new ArrayList<String>();
allowedFormats.add(dtFormat);
allowedFormats.add("d MMM yyyy hh:mm a");