Use constant

This commit is contained in:
Tadgh 2021-02-01 16:31:35 -05:00
parent 5e36d71e41
commit c5299df4d3
1 changed files with 2 additions and 1 deletions

View File

@ -1,5 +1,6 @@
package ca.uhn.fhir.rest.server.messaging;
import ca.uhn.fhir.rest.api.Constants;
import ca.uhn.fhir.rest.server.messaging.json.ResourceOperationJsonMessage;
import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
@ -18,7 +19,7 @@ class ResourceOperationMessageTest {
public void testSerializationAndDeserializationOfResourceModifiedMessage() throws JsonProcessingException {
ResourceOperationJsonMessage jsonMessage = new ResourceOperationJsonMessage();
ResourceOperationMessage payload = new ResourceOperationMessage();
payload.setMimeType("application/fhir+json");
payload.setMimeType(Constants.CT_FHIR_JSON_NEW);
jsonMessage.setPayload(payload);
ObjectMapper mapper = new ObjectMapper();
String serialized = mapper.writeValueAsString(jsonMessage);