    @Test
    public void testCompare() throws Exception {

        SecureRandom random = new SecureRandom();
        Sha256Hasher hasher = new Sha256Hasher();
        hasher.init();
        String password;
        for (int i =0; i < 100; i++){
            password = new BigInteger(130, random).toString(32);
            Assert.assertTrue(hasher.compare(password, hasher.transform(password)));
            Assert.assertFalse(hasher.compare("notPassword", hasher.transform(password)));
        }
        password = "lkfdjsafd:fldksaalsd";
        Assert.assertTrue(hasher.compare(password, hasher.transform(password)));
        Assert.assertFalse(hasher.compare("notPassword", hasher.transform(password)));
    }