JiriOndrusek commented on a change in pull request #2254:
URL: https://github.com/apache/camel-quarkus/pull/2254#discussion_r576782924



##########
File path: 
integration-tests/nitrite/src/test/java/org/apache/camel/quarkus/component/nitrite/it/NitriteTest.java
##########
@@ -78,28 +115,42 @@ public void repositoryClass() throws 
CloneNotSupportedException {
         /* Insert Irma */
         RestAssured.given()
                 .contentType(ContentType.JSON)
+                .queryParam("mappable", mappable)
                 .body(irma)
                 .post("/nitrite/repositoryClass")
                 .then()
                 .statusCode(200)
                 .body("name", is("Irma"));
-        RestAssured.get("/nitrite/repositoryClass")
+        RestAssured.given()
+                .queryParam("mappable", mappable)
+                .post("/nitrite/getRepositoryClass")
                 .then()
                 .statusCode(200)
                 .header(NitriteConstants.CHANGE_TYPE, "INSERT")
                 .body("name", is("Irma"));
 
-        Employee updatedSheldon = (Employee) sheldon.clone();
+        Employee updatedSheldon = null;
+        if (sheldon instanceof EmployeeSerializable) {
+            updatedSheldon = (EmployeeSerializable) sheldon.clone();
+        } else {
+            updatedSheldon = (EmployeeMappable) sheldon.clone();
+        }
         updatedSheldon.setAddress("Moon");
+
         RestAssured.given()
                 .contentType(ContentType.JSON)
-                .body(new Operation(Operation.Type.update, "name", "Sheldon", 
updatedSheldon))
+                .body(new Operation(Operation.Type.update, "name", "Sheldon",
+                        mappable ? null : (EmployeeSerializable) 
updatedSheldon,
+                        mappable ? (EmployeeMappable) updatedSheldon : null))
+                .queryParam("mappable", mappable)
                 .post("/nitrite/repositoryClassOperation")
                 .then()
                 .body("name", is("Sheldon"),
                         "address", is("Moon"));
 
-        RestAssured.get("/nitrite/repositoryClass")
+        RestAssured.given()

Review comment:
       I think it is ok, see previous comment




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to