Probably in the distant past. >150Ma. It is only recently that this part of NZs history has been more or less resolved. NZ was formed from an island arc on one side and a granite landmass on the other. This is known from mineralogical studies of the sediment from which the rocks were derived.
At some time, a land link may have existed via New Caledonia. The unresolved questions are when did the beech forests arrive (from Gondwanna); when did the moa, a relative of the emu and ostrich arrive, and similarly for the land lizards and skinks.
So offshore Queensland is one popular suggestion.