@Test
public void testJsonBodyValidator() {
final JsonObject json = new JsonObject().putObject("user", new JsonObject().putString("login", "paulo").putString("password", "pwd"));
Yoke yoke = new Yoke(this);
yoke.use(new com.jetdrone.vertx.yoke.middleware.BodyParser());
yoke.use(new Router().post("/search/:from/:to", new Middleware() {
@Override
public void handle(@NotNull YokeRequest request, @NotNull Handler<Object> next) {
com.jetdrone.vertx.yoke.util.Validator validator = new com.jetdrone.vertx.yoke.util.Validator(
that("param:from").is(Type.DateTime),
that("param:to").is(Type.DateTime),