Menagerie
From Memory Alpha, the free Star Trek reference
The Talosian menagerie was an elaborate test devised by the inhabitants of the planet Talos IV to evaluate the intelligence and resourcefulness of specimens of intelligent life they had collected.
The Talosians' ultimate aim was to find a species that could be bred to serve them by recolonizing the war-ravaged surface of their world. Test subjects were kept in small cells with large observation panels and fed with synthetic food. The Talosians were able to test the subjects' responses by a series of illusions and telepathic tricks. It was hoped that subjects would discover a way to escape from their cage and make their way to the surface to begin cultivating it.
Captain Christopher Pike of the USS Enterprise was imprisoned in the menagerie in 2254. Although he was able to "pass" the Talosians' test and escape to the surface, the Talosians came to the conclusion that Humans' hatred of captivity made the species unsuitable for their needs. (TOS: "The Cage", "The Menagerie, Part I", "The Menagerie, Part II")
