added optional mockSignature parameter to ensure deterministic output for testing purposes