If you put a dispenser so it shoots upwards and place a spawn egg inside it, then fire the mob out, the mob will spawn inside the dispenser.
Related issues
duplicates
Attachments
Comments

[media]

Duplicate of MC-8293, please use the search function to see if your bug has already been submitted. Currently over 51% of tickets are being closed as duplicate.