If the court rules in Assange's favour, allowing him to leave the embassy in the British capital without fear of arrest, it would be the first time that he has stepped outside embassy grounds since seeking asylum there in June 2012.
Assange entered the Ecuadoran embassy to dodge a European arrest warrant and extradition to Sweden over a 2010 probe in the Scandinavian country into rape and sexual assault allegations.
Sweden dropped its investigation last year, but British police are still seeking to arrest Assange for failing to surrender to a court after violating bail terms during his unsuccessful battle against extradition.
Assange's lawyer Mark Summers told a London court last week that the warrant had "lost its purpose and its function".
He said Assange had been living in conditions "akin to imprisonment" and his "psychological health" has deteriorated and was "in serious peril".
The court heard that the 46-year-old was suffering from a bad tooth, a frozen shoulder and depression.
But prosecutor Aaron Watkins called Assange's court bid "absurd".
"The proper approach is that when a discrete, standalone offence of failing to surrender occurs, it always remains open to this court to secure the arrest," Watkins said.
Assange has refused to leave the embassy, claiming he fears being extradited to the United States over WikiLeaks' publication of secret US military documents and diplomatic cables in 2010.
US Attorney General Jeff Sessions last year said his arrest was a "priority".
Assange only very rarely emerges on the balcony of the embassy building, citing concerns for his personal safety, but frequently takes part in media conferences and campaigns via video link.
Earlier this month, Ecuador said it had granted citizenship to Assange, born in Australia, and asked Britain to recognise him as a diplomat in an unsuccessful attempt to provide him with immunity and usher him out of its embassy without the threat of arrest.
But London swiftly rejected the move.
"Ecuador knows that the way to resolve this issue is for Julian Assange to leave the embassy to face justice," the British government said.
Assange has strained the patience of his hosts during his long stay.
He was publicly reprimanded for interfering in the 2016 US election after publishing hacked emails from the campaign team of Democrat Hillary Clinton.
More recently, he drew the ire of Ecuadoran President Lenin Moreno when he used Twitter to pump out messages of support for Catalonia's independence drive.
Moreno was forced to respond to complaints from the Spanish government.
Moreno, in office since 2017, said last month Assange was an "inherited problem" that had created "more than a nuisance" for his government.
"We hope to have a positive result in the short term," Moreno said in an interview with television networks.
More about: JulianAssange