DateFormat formatter = new SimpleDateFormat("dd/MM/yyyy");
Date startDate = formatter.parse("01/01/2010");
Date endDate = formatter.parse("01/01/2011");
StopWatch stopWatch = new StopWatch();
stopWatch.start();
Assert.assertEquals(dao.getTotalNumberOfSalesForPaymentTypeUsingFethcAll(PaymentType.VISA, startDate, endDate).intValue(), 5448);
stopWatch.stop();
LOGGER.info("SaleRecordsDAOTest.testGetTotalNumberOfSalesForPaymentTypeUsingFetchAll - batch fetching took " + stopWatch);