@Test
public void test6createService() throws Exception {

	RangerService rangerService = rangerService();
	XXServiceDef xServiceDef = serviceDef();
	XXServiceDefDao xServiceDefDao = Mockito.mock(XXServiceDefDao.class);
	Mockito.when(validatorFactory.getServiceValidator(svcStore))
			.thenReturn(serviceValidator);
	Mockito.when(daoManager.getXXServiceDef()).thenReturn(xServiceDefDao);
	Mockito.when(xServiceDefDao.findByName(rangerService.getType()))
			.thenReturn(xServiceDef);
	Mockito.when(
			svcStore.createService((RangerService) Mockito.any()))
			.thenReturn(rangerService);
	RangerService dbRangerService = serviceREST
			.createService(rangerService);
	Assert.assertNotNull(dbRangerService);
	Assert.assertEquals(rangerService, dbRangerService);
	Assert.assertEquals(rangerService.getId(), dbRangerService.getId());
	Assert.assertEquals(rangerService.getConfigs(),
			dbRangerService.getConfigs());
	Assert.assertEquals(rangerService.getDescription(),
			dbRangerService.getDescription());
	Assert.assertEquals(rangerService.getGuid(), dbRangerService.getGuid());
	Assert.assertEquals(rangerService.getName(), dbRangerService.getName());
	Assert.assertEquals(rangerService.getPolicyVersion(),
			dbRangerService.getPolicyVersion());
	Assert.assertEquals(rangerService.getType(), dbRangerService.getType());
	Assert.assertEquals(rangerService.getVersion(),
			dbRangerService.getVersion());
	Assert.assertEquals(rangerService.getCreateTime(),
			dbRangerService.getCreateTime());
	Assert.assertEquals(rangerService.getUpdateTime(),
			dbRangerService.getUpdateTime());
	Assert.assertEquals(rangerService.getUpdatedBy(),
			dbRangerService.getUpdatedBy());
	Mockito.verify(validatorFactory).getServiceValidator(svcStore);
	Mockito.verify(svcStore).createService(rangerService);
}