编写测试Controller:
package com.wartao.test.mock.controller;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/**
* @author ignore1992
*
*/
@RestController
@RequestMapping(value = "/simple")
public class SimpleController
{
/**
* 存放元素的集合
*/
private List<String> demos = Collections.synchronizedList(new ArrayList());