@Test
public void shouldevaluateDataValueTemplate()
		throws DHIS2ReportingException, JAXBException, IOException,
		ParseException {

	ClassPathResource resource = new ClassPathResource(
			"reportDefinition.xml");
	JAXBContext jaxbContext = JAXBContext
			.newInstance(ReportTemplates.class);
	Unmarshaller jaxbUnmarshaller = jaxbContext.createUnmarshaller();
	ReportTemplates reportTemplates = (ReportTemplates) jaxbUnmarshaller
			.unmarshal(resource.getInputStream());
	List<ReportDefinition> rds = reportTemplates.getReportDefinitions();
	String timeperiod = "2016-06-28";
	Location location = new Location();
	location.setName("County General");
	location.setDescription("desc");
	location.setAddress1("address1");
	location.setId(3);
	Period period = new MonthlyPeriod(new SimpleDateFormat("yyyy-MM-dd")
			.parse(timeperiod));
	SimpleDateFormat dateformat = new SimpleDateFormat("yyyy-MM-dd");
	String start = "2016-06-28";
	String end = "2016-06-30";
	Date startDate = null;
	Date endDate = null;
	startDate = dateformat.parse(start);
	endDate = dateformat.parse(end);
	period.setStartDate(startDate);
	period.setEndDate(endDate);
	for (ReportDefinition rd : rds) {
		for (DataValueTemplate r : rd.getDataValueTemplates()) {
			String dvs = dao.evaluateDataValueTemplate(r, period, location,
					false);
			assertEquals("3", dvs);
		}
	}
}