FileScannerDao extends HibernateDao<FileScanner, Long> { @SuppressWarnings ("unchecked") public List<String> getScannerCollections (final Long scan_id) { return (List<String>)getHibernateTemplate().find( "select c.uuid " + "from FileScanner fs inner join fs.collections c " + "where fs.id=?)", scan_id); }  int deleteCollectionReferences(final Collection collection); @SuppressWarnings ("unchecked") List<String> getScannerCollections(final Long scan_id); @Override void delete(final FileScanner scanner); void resetAll(); User getUserFromScanner(FileScanner fs); boolean exists(final FileScanner file_scanner);  }
@Test public void getScannerCollections () { List<String> list = dao.getScannerCollections (0L); assertNotNull (list); assertEquals (list.size (), 2); assertTrue (list.contains ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1")); assertTrue (list.contains ("aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa2")); }