@Test
public void testCommitment()
    throws NoSuchAlgorithmException {

    byte[] msg = "message".getBytes();
    Commitment comm = new Commitment(msg);
    if(comm.getValue().length != Digest.HASH_SIZE_BYTES) {
        fail("Computation of commitment failed - wrong length.");
    }
    assertNotNull("Computation of commitment failed - null",
                  comm.getValue());
    assertTrue("Invalid commitment", comm.verify(msg));
}