public void testSearchEventNotLowerCamelMaxNum() throws Exception {
for (int i = 1; i <= 11; ++i) {
storeEventBeforeDeadline();
}
ActionProxy proxy = getActionProxy(POST, "/api/event/search");
addFormParameter(proxy, "query", SEARCH_QUERY);
addFormParameter(proxy, "category", "all");
addFormParameter(proxy, "beforeDeadlineOnly", "true");
addFormParameter(proxy, "sortOrder", "score");
// addFormParameter(proxy, "maxNum", null);
addFormParameter(proxy, "maxnum", "10");
proxy.execute();
assertResultOK(proxy);
ObjectNode json = getJSON(proxy);
assertThat(json.has("reason"), equalTo(false));
assertThat(json.get("events").size(), equalTo(10));