params.put("component", "org.sample.Sample");
params.put("query", "text");
params.put("selected", "all");
params.put("page", 2);
params.put("pageSize", 50);
PermissionQuery query = PermissionQueryParser.toQuery(params);
assertThat(query.permission()).isEqualTo("admin");
assertThat(query.component()).isEqualTo("org.sample.Sample");
assertThat(query.template()).isEqualTo("my_template_key");
assertThat(query.search()).isEqualTo("text");
assertThat(query.pageSize()).isEqualTo(50);
assertThat(query.pageIndex()).isEqualTo(2);
assertThat(query.membership()).isEqualTo(PermissionQuery.ANY);
}