public async Task Final_status_is_something_other_than_complete_there_there_is_no_errorCode() { mockServer .Given(Request.Create().WithPath("/v2/contentConverters/fake-process-id").UsingGet()) .RespondWith(Response.Create() .WithStatusCode(200) .WithHeader("Content-Type", "application/json") .WithBody("{\"processId\":\"fake-process-id\",\"expirationDateTime\":\"2020-01-06T16:50:45.637Z\",\"state\":\"dead\",\"percentComplete\":100}")); string[] expectedStringsContainedInErrorMessage = new[] { @"Unexpected conversion state ""dead""", @"{""processId"":""fake-process-id"",""expirationDateTime"":""2020-01-06T16:50:45.637Z"",""state"":""dead"",""percentComplete"":100}", }; await UtilAssert.ThrowsExceptionWithMessageContainingAsync <RestApiErrorException>( async() => { await prizmDocServer.ConvertAsync("documents/example.pdf", DestinationFileFormat.Pdf); }, expectedStringsContainedInErrorMessage); }