@Test
public void testGetAllSecurityZone() throws Exception {

	RangerSecurityZone securityZone = createRangerSecurityZone();
	HttpServletRequest request = Mockito.mock(HttpServletRequest.class);
	SearchFilter filter = new SearchFilter();
	when(
			searchUtil.getSearchFilter(request, securityZoneService.sortFields))
			.thenReturn(filter);
	Long securityZoneId = 2L;
	securityZone.setId(securityZoneId);
	List<RangerSecurityZone> zonesList = new ArrayList<>();
	zonesList.add(securityZone);
	RangerSecurityZoneList rangerZoneList = new RangerSecurityZoneList();
	rangerZoneList.setSecurityZoneList(zonesList);
	when(securityZoneStore.getSecurityZones(filter)).thenReturn(zonesList);
	RangerSecurityZoneList returnedZonesList = securityZoneREST.getAllZones(request);
	assertEquals(returnedZonesList.getResultSize(), rangerZoneList.getList().size());
	verify(securityZoneStore, times(1)).getSecurityZones(filter);
}