@@ -0,0 +1,1038 @@
+package com.orientechnologies.orient.core.security;%0A%0Aimport org.testng.annotations.Test;%0A%0Aimport static org.assertj.core.api.Assertions.assertThat;%0A%0A/**%0A * Created by frank on 19/11/2015.%0A */%0Apublic class OSecurityManagerTest %7B%0A%0A  @Test%0A  public void shouldCheckPlainPasswordAgainstHash() throws Exception %7B%0A%0A    OSecurityManager securityManager = OSecurityManager.instance();%0A%0A    String hash = securityManager.createHash(%22password%22, OSecurityManager.HASH_ALGORITHM, true);%0A%0A    assertThat(securityManager.checkPassword(%22password%22, hash)).isTrue();%0A%0A    hash = securityManager.createHash(%22password%22, OSecurityManager.PBKDF2_ALGORITHM, true);%0A%0A    assertThat(securityManager.checkPassword(%22password%22, hash)).isTrue();%0A%0A  %7D%0A%0A  @Test%0A  public void shouldCheckPlainPasswordAgainstHashWithSalt() throws Exception %7B%0A%0A    OSecurityManager securityManager = OSecurityManager.instance();%0A%0A    String hash = securityManager.createHashWithSalt(%22password%22);%0A%0A    assertThat(securityManager.checkPasswordWithSalt(%22password%22, hash)).isTrue();%0A%0A  %7D%0A%0A%0A%7D

test for the checkPassword