A “contested hearing” and a “plea of not guilty” are the same thing. They are essentially the same as a trial in the higher courts.
The Prosecution must call evidence first and establish enough evidence against you so that the case can be proved. They do this by calling witnesses who give evidence.
The Accused then has the right to give evidence or call witnesses. Often the Accused will not give evidence because their lawyers do not believe that the Prosecution have proved the case against them. That is one of the great features of our system. If a Prosecutor wants to prove something then they have to do it. They have to prove the case beyond reasonable doubt.
Given the imbalance generally in the system towards the Prosecution this is very important. They have the weight of the State and all their resources behind them. If they can’t prove their case, why should you have to say anything.
In the Magistrates’ Court there are no juries and so the matter is decided by a Magistrate alone.
If the Magistrate finds you not guilty there is a discretion to award you payment of your costs. The Magistrate decides whether the prosecution pay costs or not. Some factors they might take into account are whether you made a “no comment” interview or whether the case was always a weak one.