If you look through my threads a few months ago, I gave some explanations on how to spoof the speed or pedal sensor signals with a cheap Aliexpress device. Today, I saw this video for another device. This one is much more suitable for testing. It could also be used as a permanent installation if you have somewhere to put it.
It runs off 5v, so you can use the pedal sensor, speed sensor or throttle power wires to power it, and send the output through the pedal sensor or speed sensor signal wires. For a permanent installation as a pedal sensor spoof, you'd need an accessible momentary switch on the 5v wire.
This one is very easy to set. For pedal assist spoof, the frequency would be one turn of the pedals per second, which would typically be 8 or 12 magnets per second, so say 10hz. Duty cycle would be 50%. For speed sensor spoof, there's normally only one magnet, and a 26" wheel turns at about 201 rpm at 15 mph, so 200hz would show as about 15 mph. The pedal sensor needs a discrete pulse, so duty cycle should be around 10% or less. Some controllers have the speed sensor pulse low rather than high, so if 10% doesn't work, try 90% or higher.
The ideal use for this device is to test your system if you suspect that the pedal sensor isn't working or is giving problems, though you will have to use an appropriate connector.