@Test
public void toHashedHexStringSHA256() throws Exception {

    // MD5 is default, this will make sure we don't break that
    Hasher hasher = new Hasher(Hasher.Algorithm.SHA256);
    String sample1 = hasher.toHashedHexString(SHA256_SAMPLE1);
    Assert.assertEquals(SHA256_SAMPLE1_HASH, sample1);
    String sample2 = hasher.toHashedHexString(SHA256_SAMPLE2);
    Assert.assertEquals(SHA256_SAMPLE2_HASH, sample2);
    String sample3 = hasher.toHashedHexString(SHA256_SAMPLE3);
    Assert.assertEquals(SHA256_SAMPLE3_HASH, sample3);
    Assert.assertEquals(64, sample3.length());
}