*
* @throws IOException
*/
@Test
public void testSerialization() throws IOException {
SearchQueryBuilder builder = new SearchQueryBuilder();
SearchQuery searchQuery = builder.withQuery(new KeywordQuery("f", "v")).withConstraint(
new KeywordQueryConstraint("c", "d")).withPagination(new Pagination()).build();
String jsonString = SerializationUtils.toJson(searchQuery);
Assert.assertEquals(jsonString, "{\"queries\":[{\"@type\":\"keyword\",\"field\":\"f\",\"keyword\":\"v\"}],"
+ "\"constraints\":[{\"@type\":\"keyword\",\"field\":\"c\",\"keyword\":\"d\"}],"