diff --git a/management-api-server/src/test/java/com/datastax/mgmtapi/NonDestructiveOpsIT.java b/management-api-server/src/test/java/com/datastax/mgmtapi/NonDestructiveOpsIT.java index 0d86a627..4d13dbf7 100644 --- a/management-api-server/src/test/java/com/datastax/mgmtapi/NonDestructiveOpsIT.java +++ b/management-api-server/src/test/java/com/datastax/mgmtapi/NonDestructiveOpsIT.java @@ -794,16 +794,14 @@ public void testAsyncRepair() throws IOException, URISyntaxException, Interrupte return; } assertThat(getJobDetailsResponse.getLeft()).isEqualTo(HttpStatus.SC_OK); - Map jobDetails = + Job jobDetails = new JsonMapper() .readValue( getJobDetailsResponse.getRight(), - new TypeReference>() {}); - assertThat(jobDetails) - .hasEntrySatisfying("id", value -> assertThat(value).isEqualTo(jobId)) - .hasEntrySatisfying("type", value -> assertThat(value).isEqualTo("repair")) - .hasEntrySatisfying( - "status", value -> assertThat(value).isIn("COMPLETED", "ERROR")); + new TypeReference() {}); + assertThat(jobDetails.getJobId()).isEqualTo(jobId); + assertThat(jobDetails.getJobType()).isEqualTo("repair"); + assertThat(jobDetails.getStatus()).isIn("COMPLETED", "ERROR"); }); } @@ -1019,18 +1017,12 @@ public void testMoveNode() throws IOException, URISyntaxException { .thenApply(this::responseAsCodeAndBody) .join(); assertThat(getJobDetailsResponse.getLeft()).isEqualTo(HttpStatus.SC_OK); - Map jobDetails = + Job jobDetails = new JsonMapper() - .readValue( - getJobDetailsResponse.getRight(), - new TypeReference>() {}); - assertThat(jobDetails) - .hasEntrySatisfying("id", value -> assertThat(value).isEqualTo(jobId)) - .hasEntrySatisfying("type", value -> assertThat(value).isEqualTo("move")) - // if the server has only one token, the job will be completed, otherwise it will - // end up in error - .hasEntrySatisfying( - "status", value -> assertThat(value).isIn("COMPLETED", "ERROR")); + .readValue(getJobDetailsResponse.getRight(), new TypeReference() {}); + assertThat(jobDetails.getJobId()).isEqualTo(jobId); + assertThat(jobDetails.getJobType()).isEqualTo("move"); + assertThat(jobDetails.getStatus()).isIn("COMPLETED", "ERROR"); }); } -} +} \ No newline at end of file