The Blackcaps have rediscovered their form with the bat in chasing down Sri Lanka's challenging 357 in their final Champions Trophy warm-up match at Edgbaston in Birmingham.
Kane Williamson's men were set a challenging 357-run target, following a superb 110 off 104 balls by Sri Lankan opener Upul Tharanga.
Martin Guptill, who made just nine in Monday's match against India, stepped up with a powerful century off just 73 balls.
He and Tom Latham (44) put on 78 runs for the first wicket, Guptill going on to combine with Williamson (88 not out) for a rollicking 151-run stand in 16 overs.
Both batsmen were retired, Guptill on 116, allowing Corey Anderson (50 not out) and Neil Broom to finish the job at the start of the 46th over with only two wickets having been lost.
The Blackcaps now set their sights on their opening game of the tournament against Australia at the same ground on Friday.