Heinz has been taken to court in Australia after a watchdog said it falsely marketed a children's food as healthy.
The lawsuit concerns Shredz, a snack made from fruit juice concentrate and pastes.
Heinz, which denies the allegations, says the bars have "a similar nutrition profile to sultanas".
But the Australian Competition and Consumer Commission (ACCC) says they should be treated like confectionery.
It claims the snack, aimed at toddlers, contains more than 60% sugar.
The product is no longer on the market, but came in three flavours - "peach apple and veg", "berries apple and veg", and "strawberry and apple with chia seeds".
The packaging stated it was "99% fruit and veg" and featured a selection of fruits prominently on the front.
'There are nutrients in a Big Mac'
The ACCC's lawyer, Tom Duggan, told the Federal Court in Adelaide that the "berries, apple and veg" Shredz had up to 68.7 grams of sugar per 100 grams.
Nutritionist Rosemary Stanton, who helped draw up Australia's dietary guidelines, said the bars were more akin to sweets than fruit or vegetables.
"Confectionery with added vitamins is still confectionery," she said.
She added that while the product did contain some dietary fibre as well as assorted vitamins, the same is true of many unhealthy foods.
"Sure, there are some positive nutrients in there, just as there are positive nutrients in a Big Mac," she said.
The nutritionist advised that Shredz, in her opinion, should be categorised as an occasional treat.
You might also like
The food company strongly denies the allegations of false marketing.
In a statement, Heinz rejected the ACCC's claims about the bars' packaging.
"The Shredz products were snack foods available in small individually-packaged serves appropriate for children aged one to three," it said.
"The Shredz products had a similar nutrition profile to dried apple or sultanas.
"Heinz stands behind the Shredz products and their packaging."
The legal action was launched in June 2016 after a complaint about toddlers' foodstuffs by campaign group the Obesity Policy Coalition.
The ACCC is seeking financial penalties, corrective notices and costs from Heinz.