@Test
       public void testValidateWhileFetchingSecurityZoneForCreateThrowsError() throws Exception{

                SearchFilter filter = getSerachFilter();
	RangerService rangerSvc = getRangerService();
	
               RangerServiceDef rangerSvcDef = rangerServiceDef();
               RangerSecurityZone suppliedSecurityZone = getRangerSecurityZone();
	
	Mockito.when(_store.getSecurityZone("MyZone")).thenReturn(null);
	Mockito.when(_store.getServiceByName("hdfsSvc")).thenReturn(rangerSvc);
	Mockito.when(_store.getServiceDefByName("1")).thenReturn(rangerSvcDef);
	Mockito.when(_securityZoneStore.getSecurityZones(filter)).thenThrow(new NullPointerException());
	try {
		rangerSecurityZoneValidator.validate(suppliedSecurityZone,
				RangerValidator.Action.CREATE);
	} catch (Exception ex) {
		Assert.assertEquals(
				ex.getMessage(),
				"(0) Validation failure: error code[3045], reason[Internal Error:[null]], field[null], subfield[null], type[] ");
	}
}