@Test
public void test17getServiceDefs() throws Exception {

	SearchFilter filter = new SearchFilter();
	filter.setParam(SearchFilter.POLICY_NAME, "policyName");
	filter.setParam(SearchFilter.SERVICE_NAME, "serviceName");
	List<RangerServiceDef> serviceDefsList = new ArrayList<RangerServiceDef>();
	RangerServiceDef serviceDef = rangerServiceDef();
	serviceDefsList.add(serviceDef);
	RangerServiceDefList serviceDefList = new RangerServiceDefList();
	serviceDefList.setPageSize(0);
	serviceDefList.setResultSize(1);
	serviceDefList.setSortBy("asc");
	serviceDefList.setSortType("1");
	serviceDefList.setStartIndex(0);
	serviceDefList.setTotalCount(10);
	serviceDefList.setServiceDefs(serviceDefsList);
	Mockito.when(serviceDefService.searchRangerServiceDefs(filter))
			.thenReturn(serviceDefList);
	List<RangerServiceDef> dbServiceDef = serviceDBStore
			.getServiceDefs(filter);
	Assert.assertNotNull(dbServiceDef);
	Assert.assertEquals(dbServiceDef, serviceDefsList);
	Assert.assertEquals(dbServiceDef.get(0), serviceDefsList.get(0));
	Mockito.verify(serviceDefService).searchRangerServiceDefs(filter);
}