diff --git a/src/test/java/org/opensearch/flowframework/FlowFrameworkRestTestCase.java b/src/test/java/org/opensearch/flowframework/FlowFrameworkRestTestCase.java index cd20acf8a..37175e949 100644 --- a/src/test/java/org/opensearch/flowframework/FlowFrameworkRestTestCase.java +++ b/src/test/java/org/opensearch/flowframework/FlowFrameworkRestTestCase.java @@ -445,7 +445,7 @@ protected SearchResponse searchWorkflowState(String query) throws Exception { assertEquals(RestStatus.OK, TestHelpers.restStatus(restSearchResponse)); // Parse entity content into SearchResponse - MediaType mediaType = MediaType.fromMediaType(restSearchResponse.getEntity().getContentType()); + MediaType mediaType = MediaType.fromMediaType(restSearchResponse.getEntity().getContentType().getValue()); try ( XContentParser parser = mediaType.xContent() .createParser( @@ -471,8 +471,8 @@ protected void getAndAssertWorkflowStatus(String workflowId, State stateStatus, assertEquals(RestStatus.OK, TestHelpers.restStatus(response)); Map responseMap = entityAsMap(response); - assertEquals(stateStatus.name(), (String) responseMap.get(CommonValue.STATE_FIELD)); - assertEquals(provisioningStatus.name(), (String) responseMap.get(CommonValue.PROVISIONING_PROGRESS_FIELD)); + assertEquals(stateStatus.name(), responseMap.get(CommonValue.STATE_FIELD)); + assertEquals(provisioningStatus.name(), responseMap.get(CommonValue.PROVISIONING_PROGRESS_FIELD)); }