public static <T> PaginatedResponse<T> create(String listKey, PaginatedList<T> paginatedList) {
        return new PaginatedResponse<>(listKey, paginatedList, null, null);
    }
@Test
    public void serializeWithQuery() throws Exception {
        final ImmutableList<String> values = ImmutableList.of("hello", "world");
        final PaginatedList<String> paginatedList = new PaginatedList<>(values, values.size(), 1, 10);
        final PaginatedResponse<String> response = PaginatedResponse.create("foo", paginatedList, "query1");

        final DocumentContext ctx = JsonPath.parse(objectMapper.writeValueAsString(response));
        final JsonPathAssert jsonPathAssert = JsonPathAssert.assertThat(ctx);

        jsonPathAssert.jsonPathAsString("$.query").isEqualTo("query1");
        jsonPathAssert.jsonPathAsInteger("$.total").isEqualTo(2);
        jsonPathAssert.jsonPathAsInteger("$.count").isEqualTo(2);
        jsonPathAssert.jsonPathAsInteger("$.page").isEqualTo(1);
        jsonPathAssert.jsonPathAsInteger("$.per_page").isEqualTo(10);
        jsonPathAssert.jsonPathAsString("$.foo[0]").isEqualTo("hello");
        jsonPathAssert.jsonPathAsString("$.foo[1]").isEqualTo("world");
        assertThatThrownBy(() -> jsonPathAssert.jsonPathAsString("$.context")).isInstanceOf(PathNotFoundException.class);
    }