Add HandlerWithOptions method and a unit test.