He is also alleged to have threatened to kill the complainant if he reported the alleged offending or tried to move to a different cell, at one point pulling a shank on the man.
The complainant gave evidence in court on Monday, saying if he refused to engage in the sexual acts Goundar would slap and punch him repeatedly until he complied.
The alleged abuse ended when an anonymous tip-off was made, and Goundar was moved out of the unit. The complainant gave a statement to police later in the year.
Today the jury of eight men and four women were informed of Goundar's previous violent sexual offending, which he was sentenced for in 2013.
That offending happened in late December 2011, when Goundar and his co-offender were driving in Hamilton.
The pair saw two teenage girls and stopped to offer them a lift. The girls, who did not know the men, initially refused, but were later persuaded to get into the car.
He then drove them to a rural area. The girls tried to escape when the two men got out of the car to urinate, but Goundar grabbed the younger girl and forced her into the back of the car.
The other victim initially tried to get him to let go of the younger girl, but Goundar's co-offender punched her in the face, and she then fled to seek help.
Goundar then drove off with the girl and his co-offender, found a secluded spot and ordered the teenager to perform oral sex on him. When she refused he hit her on the head until she complied.
Both men then raped the girl, and Goundar again forced her to perform oral sex twice, threatening to kill her if she did not submit.
The men eventually let the girl out of the car.
In court today, Goundar gave evidence in his defence, saying he never had any issue with his cellmate, never sexually abused him or asked for sexual favours, never assaulted him in any way, and never "bossed him around". He also denied having or using a shank.
Crown prosecutor Jamie O'Sullivan suggested to Goundar he was the type of person who used violence to get his way, which he denied.
She pointed to the similarities with the 2011 offending - where the victims were vulnerable and younger, Goundar had lured them into the car with a "friendly face" but then became violent and struck the younger girl around the head repeatedly until she complied with his demands.
"You were a friendly face to [your cellmate] at first. When he didn't do what you wanted him to do, you applied the same techniques as you did with those young women in 2011 didn't you?
"What you did in 2011 demonstrates that you don't care if the other person is consenting or not, you are prepared to do whatever you need to to get your own way and your own sexual gratification."
Goundar said that was incorrect and that he was "not proud" of the decisions he made in the past.
Defence lawyer Karun Lakshman also read out an agreed statement of facts, referencing police interviews with three other prison inmates.
Those inmates, who lived in neighbouring cells, said they never noticed anything unusual in Goundar's cell, never noticed him treating his cellmate badly, and never noticed any injuries on the complainant.
The trial will continue tomorrow.
Where to get help:
• If it's an emergency and you feel that you or someone else is at risk, call 111.
• If you've ever experienced sexual assault or abuse and need to talk to someone call the confidential crisis helpline Safe to Talk on: 0800 044 334 or text 4334. (available 24/7)
• Male Survivors Aotearoa offers a range of confidential support at centres across New Zealand - find your closest one here.
• Mosaic - Tiaki Tangata: 0800 94 22 94 (available 11am - 8pm)
• If you have been abused, remember it's not your fault.
• Wellington HELP has a 24/7 helpline for people who need to speak to someone immediately. You can call 04 801 6655 and push 0 at the menu.