Planet of Judgment

Planet of Judgment (1977) is a science fiction novel by American writer Joe Haldeman, a tie-in of the TV series Star Trek.

Plot summary
The crew of the Starship Enterprise detects a rogue planet (dubbed Anomaly) orbited by a miniature black hole. This seems to contravene all scientific laws. Assuming that the system is artificial, Captain Kirk leads a landing party to the planet's surface, where they become trapped. The crew find themselves at the center of a galactic conflict, in which an alien race is threatening to invade Federation space. Dr. McCoy, Mr. Spock, and Captain Kirk must participate in a series of trials that will determine not just their survival, but that of the Federation.

Production
According to the author, he was approached for a two-book contract at the suggestion of Fred Pohl.