Who should get the tips you leave in that plexiglass box at Starbucks?

That's the question at the center of a dispute in front of New York state's highest court.

Lawyers for baristas, assistant store managers and Starbucks argued in front of the New York Court of Appeals this week to hash out what types of employees are eligible to participate in a tip-pooling arrangement.

As it stands, Starbucks (SBUX) distributes the pooled tips among baristas and shift managers, while store managers and assistant managers don't get a share of the pot. Baristas and shift managers both work on a on a part-time, hourly basis.

But New York labor law prohibits an "agent," which includes "supervisors," from keeping tips. Baristas claim that this definition prevents Starbucks from allowing shift supervisors to take a piece of the pie. But Starbucks said that shift supervisors are primarily responsible for servicing food and drinks to customers, and that supervisors generate tips for their services, just as baristas do.

Related: Fast food workers' protests pay off

The court is being asked to clarify whether employees who work mainly to serve customers can rightfully take these tips, even if they are slightly senior to baristas and do serve some managerial roles, like opening and closing stores and telling baristas when they can go on breaks.

Federal courts have ruled in favor of Starbucks in the past. In 2009, a court concluded that supervisors aren't "agents" because their limited responsibilities "do not carry the broad managerial authority or power to control employees."

Shannon Liss-Riordan, an attorney representing baristas, said that the law clearly identifies supervisors as "agents," and the duties supervisors perform are duties you would expect a manager to do, not a barista. She said that the expects a ruling by the end of July.

Liss-Riordan said that shift supervisors make at least $2 more than baristas. Starbucks would not comment on its employees' wages.

Starbucks said that its shift supervisors spend well over 90% over their time acting as baristas.

"Our tipping policy ensures the Starbucks employees who directly serve customers -- both baristas and shift managers -- share equally in the tips they receive," said Zack Huston, a Starbucks spokesman.