OrganizationDao extends AbstractXpipeConsoleDAO { public OrganizationTbl findByOrgId(long orgId) { return queryHandler.handleQuery(new DalQuery<OrganizationTbl>() { @Override public OrganizationTbl doQuery() throws DalException { return organizationTblDao.findOrgByOrgId(orgId, OrganizationTblEntity.READSET_FULL); } }); }  OrganizationTbl findByPK(long id); OrganizationTbl findByName(String orgName); OrganizationTbl findByOrgId(long orgId); List<OrganizationTbl> findAllOrgs(); List<OrganizationTbl> findInvolvedOrgs(); @DalTransaction void updateOrg(OrganizationTbl org); @DalTransaction void createBatchOrganizations(List<OrganizationTbl> orgs); @DalTransaction void updateBatchOrganizations(List<OrganizationTbl> orgs);  }
@Test public void testFindByOrgId() { organizationDao.createBatchOrganizations(createBatchOrgTbl(5)); OrganizationTbl organizationTbl = organizationDao.findByOrgId(2L); Assert.assertEquals(2L, organizationTbl.getOrgId()); }