Opener Martin Guptill says the Black Caps will approach Friday's Champions Trophy opener against Australia with renewed confidence after their six-wicket warm-up win over Sri Lanka at Edgbaston.
The New Zealanders chased down Sri Lanka's challenging 8-356 with 23 balls to spare at Birmingham early.
Guptill, who made just nine in Monday's 45-run loss to India at Kennington Oval, 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.
Guptill said it had been pleasing to find form after a scrappy showing in the rain-affected match against India.
"We had a poor display against India, and we were well aware of that," he said.
"While it wasn't ideal letting [Sri Lanka] get 350, we were able to chase it down through a very good batting display, creating partnerships and making sure we were ahead of the run rate through the middle so it didn't get away on us."
Guptill said Sri Lanka had made the most of the short western boundary at Edgbaston, with the pitch on the edge of the vast centre-wicket block.
Opener Upul Tharanga's 110 off 104 balls included 13 fours and three sixes, with Kusal Mendis (57) and Dinesh Chandimal (55) also finding the boundary regularly.
Tim Southee and Trent Boult had headlined the Kiwi bowlers, Southee snaring Tharanga in his 2-48 while Boult collected two late scalps in his 2-47.
Guptill said it had been invaluable for the Kiwi batsmen to spend time in the middle, with partnerships key in chasing down such a challenging target.
"We haven't played here for a couple of years, so to get out here and spend time on the feet out there was pretty key today," he said.
"You feed off each other. Kane had a good over, I had a good over, and we were able to rotate the strike with a bit of freedom, and make sure we didn't get bogged down at one end."
Champions Trophy 2017 Guide
Group A: Australia, New Zealand, England, Bangladesh.
Group B: India, South Africa, Sri Lanka, Pakistan.
26 May – Australia v Sri Lanka, The Oval
27 May – Bangladesh v Pakistan, Edgbaston
28 May – India v New Zealand, The Oval
29 May – Australia v Pakistan, Edgbaston
30 May – New Zealand v Sri Lanka, Edgbaston
30 May – Bangladesh vs India, The Oval
1 June – England v Bangladesh, The Oval (Day)
2 June – Australia v New Zealand, Edgbaston (D)
3 June – Sri Lanka v South Africa, The Oval (D)
4 June – India v Pakistan, Edgbaston (D)
5 June – Australia v Bangladesh, The Oval (D/N)
6 June – England v New Zealand, Cardiff (D)
7 June – Pakistan v South Africa, Edgbaston (D/N)
8 June – India v Sri Lanka, The Oval (D)
9 June – New Zealand v Bangladesh, Cardiff (D)
10 June – England v Australia, Edgbaston (D)
11 June – India v South Africa, The Oval (D)
12 June – Sri Lanka v Pakistan, Cardiff (D)
14 June – First semi-final (A1 v B2), Cardiff (D)
15 June – Second semi-final (A2 v B1), Edgbaston (D)
18 June – Final, The Oval (D)
19 June – Reserve day (D)