@Test
public void test1createSecurityZone() throws Exception {

	XXSecurityZone xxSecurityZone = null;
	RangerSecurityZone securityZone = new RangerSecurityZone();
	RangerSecurityZone createdSecurityZone = new RangerSecurityZone();
	createdSecurityZone.setId(2L);
	XXSecurityZoneDao xXSecurityZoneDao = Mockito.mock(XXSecurityZoneDao.class);
	XXGlobalStateDao xXGlobalStateDao = Mockito.mock(XXGlobalStateDao.class);
	Mockito.when(daoManager.getXXSecurityZoneDao()).thenReturn(xXSecurityZoneDao);
	Mockito.when(xXSecurityZoneDao.findByZoneName(securityZone.getName())).thenReturn(xxSecurityZone);
	Mockito.when(daoManager.getXXGlobalState()).thenReturn(xXGlobalStateDao);
	Mockito.doNothing().when(xXGlobalStateDao).onGlobalStateChange(RANGER_GLOBAL_STATE_NAME);
	Mockito.when(securityZoneService.create(securityZone)).thenReturn(createdSecurityZone);
	Mockito.doNothing().when(securityZoneRefUpdater).createNewZoneMappingForRefTable(createdSecurityZone);
	List<XXTrxLog> trxLogList = new ArrayList<XXTrxLog>();
	Mockito.doNothing().when(bizUtil).createTrxLog(trxLogList);
	
	RangerSecurityZone expectedSecurityZone = securityZoneDBStore.createSecurityZone(securityZone);
	Assert.assertNull(xxSecurityZone);
	Assert.assertEquals(createdSecurityZone.getId(), expectedSecurityZone.getId());
	Mockito.verify(daoManager).getXXSecurityZoneDao();
	Mockito.verify(daoManager).getXXGlobalState();
	Mockito.verify(securityZoneService).create(securityZone);
}