Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.junit.Before;
import org.junit.Test;
import org.mockito.Mockito;
import org.skyscreamer.jsonassert.JSONAssert;
import org.springframework.core.env.Environment;

import io.vertx.core.MultiMap;
Expand Down Expand Up @@ -146,9 +147,10 @@ public void should_convert_exception_to_response_when_decode_request_failed()
Response response = codecFilter.onFilter(invocation, nextNode).get();

assertThat(response.getStatus()).isEqualTo(INTERNAL_SERVER_ERROR);
assertThat(Json.encode(((InvocationException) response.getResult()).getErrorData()))
.isEqualTo("{\"code\":\"SCB.50000000\",\"message\":\"Unexpected "
+ "exception when processing null. encode request failed\"}");

JSONAssert.assertEquals(Json.encode(((InvocationException) response.getResult()).getErrorData()),
"{\"code\":\"SCB.50000000\",\"message\":\"Unexpected "
+ "exception when processing null. encode request failed\"}", false);
}

private void success_invocation() throws InterruptedException, ExecutionException {
Expand Down
Loading