@@ -0,0 +1,1899 @@
+package com.orientechnologies.orient.core.sql.executor;%0A%0Aimport com.orientechnologies.orient.core.db.*;%0Aimport com.orientechnologies.orient.core.metadata.security.OSecurityInternal;%0Aimport com.orientechnologies.orient.core.metadata.security.OSecurityPolicy;%0Aimport org.junit.*;%0A%0A/**%0A * @author Luigi Dell'Aquila (l.dellaquila-(at)-orientdb.com)%0A */%0Apublic class OAlterSecurityPolicyStatementExecutionTest %7B%0A  static OrientDB orient;%0A  private ODatabaseSession db;%0A%0A  @BeforeClass%0A  public static void beforeClass() %7B%0A    orient = new OrientDB(%22plocal:.%22, OrientDBConfig.defaultConfig());%0A  %7D%0A%0A  @AfterClass%0A  public static void afterClass() %7B%0A    orient.close();%0A  %7D%0A%0A  @Before%0A  public void before() %7B%0A    orient.create(%22test%22, ODatabaseType.MEMORY);%0A    this.db = orient.open(%22test%22, %22admin%22, %22admin%22);%0A  %7D%0A%0A  @After%0A  public void after() %7B%0A    this.db.close();%0A    orient.drop(%22test%22);%0A    this.db = null;%0A  %7D%0A%0A%0A  @Test%0A  public void testPlain() %7B%0A    db.command(%22CREATE SECURITY POLICY foo%22).close();%0A%0A    db.command(%22ALTER SECURITY POLICY foo SET READ = (name = 'foo')%22).close();%0A%0A%0A    OSecurityInternal security = ((ODatabaseInternal) db).getSharedContext().getSecurity();%0A    OSecurityPolicy policy = security.getSecurityPolicy((ODatabaseSession) db, %22foo%22);%0A    Assert.assertNotNull(policy);%0A    Assert.assertNotNull(%22foo%22, policy.getName());%0A    Assert.assertEquals(%22name = 'foo'%22, policy.getReadRule().toString());%0A    Assert.assertNull(policy.getCreateRule());%0A    Assert.assertNull(policy.getBeforeUpdateRule());%0A    Assert.assertNull(policy.getAfterUpdateRule());%0A    Assert.assertNull(policy.getDeleteRule());%0A    Assert.assertNull(policy.getExecuteRule());%0A%0A    db.command(%22ALTER SECURITY POLICY foo REMOVE READ%22).close();%0A%0A    policy = security.getSecurityPolicy((ODatabaseSession) db, %22foo%22);%0A    Assert.assertNotNull(policy);%0A    Assert.assertNull(policy.getReadRule());%0A%0A  %7D%0A%0A%0A%0A%7D%0A

Add test case for ALTER SECURITY POLICY statement