@Test
public void test12countPolicies() throws Exception {

	VXLong vXLong = new VXLong();
	HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
	RangerService service = rangerService();
	RangerPolicy policy = rangerPolicy();
	List<RangerPolicy> policyList = new ArrayList<RangerPolicy>();
	policyList.add(policy);
	VXPolicy vXPolicy = vXPolicy(policy, service);
	List<VXPolicy> vXPolicies = new ArrayList<VXPolicy>();
	vXPolicies.add(vXPolicy);
	VXPolicyList vXPolicyList = new VXPolicyList(vXPolicies);
	SearchFilter filter = new SearchFilter();
	filter.setParam(SearchFilter.POLICY_NAME, "policyName");
	filter.setParam(SearchFilter.SERVICE_NAME, "serviceName");
	filter.setStartIndex(0);
	filter.setMaxRows(10);
	Mockito.when(searchUtil.getSearchFilterFromLegacyRequest(request, policyService.sortFields)).thenReturn(filter);
	Mockito.when(serviceREST.getPolicies(filter)).thenReturn(policyList);
	Mockito.when(serviceUtil.rangerPolicyListToPublic(policyList,filter)).thenReturn(vXPolicyList);
	VXPolicyList dbVXPolicyList = publicAPIs.searchPolicies(request);
	vXLong.setValue(dbVXPolicyList.getResultSize());
	Assert.assertNotNull(vXLong);
	Assert.assertEquals(vXLong.getValue(), 1);
	Mockito.verify(searchUtil).getSearchFilterFromLegacyRequest(request, policyService.sortFields);
	Mockito.verify(serviceREST).getPolicies(filter);
	Mockito.verify(serviceUtil).rangerPolicyListToPublic(policyList,filter);
	
}