Package com.lissenberg.blog.util

Examples of com.lissenberg.blog.util.Timer


public class SecurityServiceTest extends TestCase {
    @Test
    public void testCreateHash() throws Exception {
        SecurityService securityService = new SecurityService();
        Timer timer = new Timer();
        String hash1 = securityService.createHash("My secret password!");
        System.out.println("Hashing took: " + timer.getDuration() + " millis");
        String hash2 = securityService.createHash("My secret password!");
        String hash3 = securityService.createHash("my secret password!");
        assertEquals(hash1, hash2);
        assertNotSame(hash1, hash3);
    }
View Full Code Here

TOP

Related Classes of com.lissenberg.blog.util.Timer

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.