Test that signature is calculated correctly