A navy officer has told a court martial she was grabbed on the botton four times by a commander during a social event at Devonport Naval Base in Auckland.
The accused man has denied the charge of indecent assault in May 2012.
It is the first court martial at the naval base for about five years.
The lieutenant told the court that she was standing with a group of people at a bar in the officers' mess when she was grabbed on the bottom.
She said the first grab was an intense grope.
She said when she turned around she saw the accused walking past and laughing.
She said he grabbed or pinched her bottom three or four more times over about two hours.
After the last grab, she said she turned around and swore at him. She said he threw his hands in the air and chuckled.
The officer told the court that she had had a professional relationship with the commander and that he had never previously shown any sexual interest.
She said that in the Airforce happy hour was often called "happy hands" because of incidents such as this, but she said she had not experienced the same thing at navy functions.
After questions by the defence lawyer, Major Peter Brock she said she had made some mistakes when she earlier recounted to investigators about some details of the event, but she clearly remembered being grabbed four or five times by the accused.
She said she had had too many drinks to drive but she was not drunk.
When Major Brock repeatedly asked her about what exactly she said to the commander she replied she told him to "f*** off".
She then said to him, "if someone grabbed your balls repeatedly, over and over, you would be pretty angry as well."
Prosecutor Major Jane Derbyshire earlier told the tribunal it was a case about a failure of leadership. She said it was about a senior officer who abused his authority by indecently assaulting a junior female officer.
She said while the nature of the actual touching may be at the lower end of the scale, it was repeated and the disparity in rank and authority between the commander and the lieutenant were "significant aggravating features".
She told the court that the accused's actions were a "fundamental betrayal of the trust which must exist between the men and women who serve in a modern Defence Force - this case strikes to the heart of what is means to be a leader in the NZDF today".
She said the complainant never indicated that she wanted the accused to touch her.
"In fact she verbally protested and made it clear that the touching was unwelcome," she said.
Three members of a military panel will give their verdict by the end of the week.
The penalty for indecent assault ranges from a fine to the ultimate sentence of dismissal.
The case is expected to continue until the end of the week.