Black Caps set Australia a challenging target of 220 after losing the toss but were made to sweat as Australia came within four runs of victory