@Test
public void test23getServiceByName() throws Exception {

	XXServiceDao xServiceDao = Mockito.mock(XXServiceDao.class);
	RangerService rangerService = rangerService();
	XXService xService = xService();
	String name = rangerService.getName();
	Mockito.when(daoManager.getXXService()).thenReturn(xServiceDao);
	Mockito.when(xServiceDao.findByName(name)).thenReturn(xService);
	Mockito.when(!bizUtil.hasAccess(xService, null)).thenReturn(true);
	Mockito.when(svcService.getPopulatedViewObject(xService)).thenReturn(
			rangerService);
	RangerService dbRangerService = serviceDBStore.getServiceByName(name);
	Assert.assertNotNull(dbRangerService);
	Assert.assertEquals(dbRangerService, rangerService);
	Assert.assertEquals(dbRangerService.getName(), rangerService.getName());
	Mockito.verify(daoManager).getXXService();
	Mockito.verify(bizUtil).hasAccess(xService, null);
	Mockito.verify(svcService).getPopulatedViewObject(xService);
}