Adds nonce check for test function