@Test
public void test17updatePolicyFalse() throws Exception {

	RangerPolicy rangerPolicy = rangerPolicy();
	String userName = "admin";
	Set<String> userGroupsList = new HashSet<String>();
	userGroupsList.add("group1");
	userGroupsList.add("group2");
	List<RangerAccessTypeDef> rangerAccessTypeDefList = new ArrayList<RangerServiceDef.RangerAccessTypeDef>();
	RangerAccessTypeDef rangerAccessTypeDefObj = new RangerAccessTypeDef();
	rangerAccessTypeDefObj.setLabel("Read");
	rangerAccessTypeDefObj.setName("read");
	rangerAccessTypeDefObj.setRbKeyLabel(null);
	rangerAccessTypeDefList.add(rangerAccessTypeDefObj);
	XXServiceDef xServiceDef = serviceDef();
	XXService xService = xService();
	XXServiceDefDao xServiceDefDao = Mockito.mock(XXServiceDefDao.class);
	XXServiceDao xServiceDao = Mockito.mock(XXServiceDao.class);
	Mockito.when(validatorFactory.getPolicyValidator(svcStore)).thenReturn(
			policyValidator);
	Mockito.when(bizUtil.isAdmin()).thenReturn(true);
	Mockito.when(bizUtil.getCurrentUserLoginId()).thenReturn(userName);
	Mockito.when(daoManager.getXXService()).thenReturn(xServiceDao);
	Mockito.when(xServiceDao.findByName(Mockito.anyString())).thenReturn(xService);
	Mockito.when(daoManager.getXXServiceDef()).thenReturn(xServiceDefDao);
	Mockito.when(xServiceDefDao.getById(xService.getType())).thenReturn(xServiceDef);
	RangerPolicy dbRangerPolicy = serviceREST.updatePolicy(rangerPolicy);
	Assert.assertNull(dbRangerPolicy);
	Mockito.verify(validatorFactory).getPolicyValidator(svcStore);
}