@Test
  public void testSecondarySortingAsPost() {
    InOrder inOrder = Mockito.inOrder(mockQuery);
    Map<String, Object> json = new HashMap<String, Object>();
    json.put(
        "sorting",
        OrderingBuilder.create()
            .orderBy("jobRetries")
            .desc()
            .orderBy("jobDueDate")
            .asc()
            .getJson());
    given()
        .contentType(POST_JSON_CONTENT_TYPE)
        .body(json)
        .header("accept", MediaType.APPLICATION_JSON)
        .then()
        .expect()
        .statusCode(Status.OK.getStatusCode())
        .when()
        .post(JOBS_RESOURCE_URL);

    inOrder.verify(mockQuery).orderByJobRetries();
    inOrder.verify(mockQuery).desc();
    inOrder.verify(mockQuery).orderByJobDuedate();
    inOrder.verify(mockQuery).asc();
  }
  @Test
  public void testSecondarySortingAsPost() {
    InOrder inOrder = Mockito.inOrder(mockedQuery);
    Map<String, Object> json = new HashMap<String, Object>();
    json.put(
        "sorting",
        OrderingBuilder.create()
            .orderBy("processInstanceId")
            .desc()
            .orderBy("timestamp")
            .asc()
            .getJson());
    given()
        .contentType(POST_JSON_CONTENT_TYPE)
        .body(json)
        .header("accept", MediaType.APPLICATION_JSON)
        .then()
        .expect()
        .statusCode(Status.OK.getStatusCode())
        .when()
        .post(HISTORIC_JOB_LOG_RESOURCE_URL);

    inOrder.verify(mockedQuery).orderByProcessInstanceId();
    inOrder.verify(mockedQuery).desc();
    inOrder.verify(mockedQuery).orderByTimestamp();
    inOrder.verify(mockedQuery).asc();
  }