Essentially, you don’t. What you’ll be wanting to do is to decouple your code from the actual input and instead rely on the results of the input. This can be done by separating all the non-Unity API code from that which does use the Unity API and then put a layer in-between the two. Then you can have a test object in your integration test which takes the place of the actual input.
The Unity team has a great blog post which goes into similar types of decoupling in decent detail here