ClusterService { public List<ClusterVO> listAllClustersFromPod(long podId) { return clusterDao.listByPodId(podId); }  List<ClusterVO> listAllClustersFromPod(long podId); ClusterVO findById(long clusterId); List<ClusterVO> listAllClustersOnZone(Long zoneId); List<ClusterVO> listAllClusters();  }
@Test public void listAllClustersFromPodTest() { Mockito.doReturn(clusters).when(clusterDao).listByPodId(Mockito.anyLong()); List<ClusterVO> result = spy.listAllClustersFromPod(0l); Mockito.verify(clusterDao).listByPodId(Mockito.anyLong()); Assert.assertEquals(clusters, result); }