import static org.junit.Assert.assertEquals;
import java.io.IOException;
import javax.servlet.ServletException;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.mock.web.MockHttpServletRequest;
import org.springframework.mock.web.MockHttpServletResponse;
import org.springframework.test.context.ContextConfiguration;
import com.lenovo.moc.portal.service.AppService;
/**
* @author Administrator
*
*/
@RunWith(JUnit4ClassRunner.class)
// 由于本测试类位于src/test/java下,而app-context.xml处于src/main/java下,所以需要使用file来获取,
// 否则使用@ContextConfiguration(locations={"classpath:WEB-INF/app-context.xml"})来获取
@ContextCon