@Test
public void toHashedHexStringSHA512() throws Exception {

    // MD5 is default, this will make sure we don't break that
    Hasher hasher = new Hasher(Hasher.Algorithm.SHA512);
    String sample1 = hasher.toHashedHexString(SHA512_SAMPLE1);
    Assert.assertEquals(SHA512_SAMPLE1_HASH, sample1);
    String sample2 = hasher.toHashedHexString(SHA512_SAMPLE2);
    Assert.assertEquals(SHA512_SAMPLE2_HASH, sample2);
    String sample3 = hasher.toHashedHexString(SHA512_SAMPLE3);
    Assert.assertEquals(SHA512_SAMPLE3_HASH, sample3);
    Assert.assertEquals(128, sample3.length());
}