The High Court is set to rule on the legality of a law requiring those released from indefinite immigration detention to wear ankle bracelets and live under a curfew.