"Can I trust this complainant? This was in a prison environment.
"This young complainant, although young, he was still in prison."
Kan said there were inconsistencies in the 19-year-old's testimony, including an implication he'd been forced to have anal sex, which he later said had never occurred.
But Crown lawyer Karen Grou said the complainant's evidence made total sense, before reading from some of the testimony.
"He talks about waking up, and Gotty trying to pull his pants down.
"He said 'he was trying to pull my pants down. I think probably if he'd gotten my pants down he probably would have tried [anal rape]'."
When asked by the judges where the inconsistencies were, Grou said she didn't know.
"He said there was a request for anal in the DVD [interview], he said it in his notebook statement, and he said it in evidence."
Grou said the 19-year-old had also been clear that the anal sex had never eventuated.
The raped happened while Gotty was in Mt Eden prison on January 27, 2016, being held on remand for a separate instance of sexual offending.
He and the teenage victim knew each other from outside prison, and Gotty had suggested they share a cell.
It was the teenager's first time at an adult prison.
In evidence given to the High Court, the teenager said on the first night Gotty started to talk about "twisted" sexual activity, before asking for oral sex.
The court was told Gotty performed oral sex on the 19-year-old, before forcing the teenager's head down to perform oral sex in return, while saying "you're my b**** now".
The teenager said he felt he didn't have a choice, as he was physically intimidated by Gotty, and had heard him boast about violence against other prisoners.
Gotty had argued the sexual activity was consensual.
The High Court sentenced Gotty to the open-ended jail term of preventive detention.
Justice Michael Downs ruled that Gotty's offending appeared to be getting worse, and that a finite sentence would not be enough protection for the community.
The Court of Appeal has reserved its decision.