@Test
public void test5getSecurityZoneByName() throws Exception {

	XXSecurityZone xxSecurityZone = new XXSecurityZone();
	xxSecurityZone.setId(2L);
	xxSecurityZone.setName("sz1");
	RangerSecurityZone securityZone = new RangerSecurityZone();
	securityZone.setId(2L);
	securityZone.setName("sz1");
	RangerSecurityZone createdSecurityZone = new RangerSecurityZone();
	createdSecurityZone.setId(2L);
	createdSecurityZone.setName("sz1");
	XXSecurityZoneDao xXSecurityZoneDao = Mockito.mock(XXSecurityZoneDao.class);
	Mockito.when(daoManager.getXXSecurityZoneDao()).thenReturn(xXSecurityZoneDao);
	Mockito.when(xXSecurityZoneDao.findByZoneName(securityZone.getName())).thenReturn(xxSecurityZone);
	Mockito.when(securityZoneService.read(securityZone.getId())).thenReturn(createdSecurityZone);
	RangerSecurityZone expectedSecurityZone = securityZoneDBStore.getSecurityZoneByName(securityZone.getName());
	Assert.assertNotNull(xxSecurityZone);
	Assert.assertEquals(createdSecurityZone.getName(), expectedSecurityZone.getName());
	Mockito.verify(securityZoneService).read(securityZone.getId());
}