DcClusterServiceImpl extends AbstractConsoleService<DcClusterTblDao> implements DcClusterService { @Override public DcClusterTbl find(final long dcId, final long clusterId) { return queryHandler.handleQuery(new DalQuery<DcClusterTbl>() { @Override public DcClusterTbl doQuery() throws DalException { return dao.findDcClusterById(dcId, clusterId, DcClusterTblEntity.READSET_FULL); } }); }  @Override DcClusterTbl find(final long dcId, final long clusterId); @Override DcClusterTbl find(final String dcName, final String clusterName); @Override DcClusterTbl addDcCluster(String dcName, String clusterName); @Override List<DcClusterTbl> findAllDcClusters(); @Override List<DcClusterTbl> findByClusterIds(final List<Long> clusterIds); @Override List<DcClusterTbl> findAllByDcId(final long dcId); @Override List<DcClusterTbl> findClusterRelated(long clusterId);  }
@Test public void testFind() { DcClusterTbl dcClusterTbl = dcClusterService.find(1L, 101L); Assert.assertNotNull(dcClusterTbl); Assert.assertEquals(101L, dcClusterTbl.getDcClusterId()); }
@Test public void testTestFind() { DcClusterTbl dcClusterTbl = dcClusterService.find("jq", "cluster101"); Assert.assertNotNull(dcClusterTbl); Assert.assertEquals(101L, dcClusterTbl.getDcClusterId()); }