Spring boot 模仿REST客户端

Spring boot 模仿REST客户端,spring-boot,rest,mocking,Spring Boot,Rest,Mocking,我使用以下测试来测试Spring Boot应用程序中的API端点: public void getFreeProducts200() throws Exception { final MockHttpServletRequestBuilder request = MockMvcRequestBuilders.get("/api/v1/events/528409/").accept(MediaType.APPLICATION_JSON_UTF8);

我使用以下测试来测试Spring Boot应用程序中的API端点:

    public void getFreeProducts200() throws Exception {
        final MockHttpServletRequestBuilder request = MockMvcRequestBuilders.get("/api/v1/events/528409/").accept(MediaType.APPLICATION_JSON_UTF8);
        final ResultActions mvcResponse = this.mvc.perform(request);
        mvcResponse.andExpect(MockMvcResultMatchers.status().isOk()).andReturn();
    }
路径/api/v1/events/{0}/映射到调用另一个REST服务的方法。 我想模拟这个底层REST接口。我该怎么做