@Test
public void test40getPoliciesByResourceSignature() throws Exception {

	List<RangerPolicy> rangerPolicyLists = new ArrayList<RangerPolicy>();
	RangerPolicy rangerPolicy = rangerPolicy();
	rangerPolicyLists.add(rangerPolicy);
	String serviceName = "HDFS_1";
	String policySignature = "Repo";
	Boolean isPolicyEnabled = true;
	RangerService rangerService = rangerService();
	List<XXPolicy> policiesList = new ArrayList<XXPolicy>();
	XXPolicy policy = new XXPolicy();
	policy.setAddedByUserId(Id);
	policy.setCreateTime(new Date());
	policy.setDescription("polcy test");
	policy.setGuid("");
	policy.setId(rangerService.getId());
	policy.setIsAuditEnabled(true);
	policy.setName("HDFS_1-1-20150316062453");
	policy.setService(rangerService.getId());
	policiesList.add(policy);
	XXPolicyDao xPolicyDao = Mockito.mock(XXPolicyDao.class);
	Mockito.when(daoManager.getXXPolicy()).thenReturn(xPolicyDao);
	Mockito.when(
			xPolicyDao.findByResourceSignatureByPolicyStatus(serviceName,
					policySignature, isPolicyEnabled)).thenReturn(
			policiesList);
	List<RangerPolicy> policyList = serviceDBStore
			.getPoliciesByResourceSignature(serviceName, policySignature,
					isPolicyEnabled);
	Assert.assertNotNull(policyList);
	Mockito.verify(daoManager).getXXPolicy();
}