protected RecordedRequest assertSent(MockWebServer server, String method, String path, String json) throws InterruptedException { RecordedRequest request = assertSent(server, method, path); assertEquals(request.getHeader("Content-Type"), APPLICATION_JSON); assertEquals(parser.parse(new String(request.getBody(), UTF_8)), parser.parse(json)); return request; }