I entered upon al-Hakam b. Ayyub along with Anas. He saw some youths or boys who had set up a hen and shooting at it. Anas said: The Messenger of Allah (ﷺ) forbade to kill an animal in confinement.
Sunan Abi Dawud Book 16, Hadith 29