Kane Williamson struck a defiant century Wednesday but was unable to put New Zealand in control in the first Test against Bangladesh in Sylhet.