小编Jav*_*ing的帖子

如何为Resttemplate交换方法编写mockito junit

如何为以下方法编写mockito junit:

@Autowired
RestTemplate restTemplate;

ResponseEntity<?> execute(final String url, HttpMethod httpMethod,
                          HttpEntity<?> entityRequest,
                          String.class, 
                          Map<String, String> urlVariables){
    restTemplate.exchange(url, httpMethod, entityRequest, responseType, urlVariables);
}
Run Code Online (Sandbox Code Playgroud)

请帮我怎么写.

junit spring mockito resttemplate

14
推荐指数
3
解决办法
3万
查看次数

标签 统计

junit ×1

mockito ×1

resttemplate ×1

spring ×1