@Test
public void testValidateSecurityZoneForCreateWithExistingNameThrowsError() throws Exception{

        RangerSecurityZone suppliedSecurityZone = getRangerSecurityZone();
        RangerSecurityZone existingSecurityZone = getRangerSecurityZone();
        Mockito.when(_store.getSecurityZone("MyZone")).thenReturn(existingSecurityZone);
        try{
                rangerSecurityZoneValidator.validate(suppliedSecurityZone, RangerValidator.Action.CREATE);
        }catch(Exception ex){
                Assert.assertEquals(ex.getMessage(), "(0) Validation failure: error code[3036], reason[Another security zone already exists for this name: zone-id=[1]]], field[name], subfield[null], type[] ");
        }
}