Improved syntax for findByDate. Added junit tests