@@ -0,0 +1,1323 @@
+package shop.test.mvc;%0D%0A%0D%0Aimport static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;%0D%0Aimport static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;%0D%0A%0D%0Aimport org.junit.Before;%0D%0Aimport org.junit.Test;%0D%0Aimport org.junit.runner.RunWith;%0D%0Aimport org.springframework.beans.factory.annotation.Autowired;%0D%0Aimport org.springframework.test.context.ContextConfiguration;%0D%0Aimport org.springframework.test.context.junit4.SpringJUnit4ClassRunner;%0D%0Aimport org.springframework.test.context.web.WebAppConfiguration;%0D%0Aimport org.springframework.test.web.servlet.MockMvc;%0D%0Aimport org.springframework.test.web.servlet.setup.MockMvcBuilders;%0D%0Aimport org.springframework.web.context.WebApplicationContext;%0D%0A%0D%0A@RunWith(SpringJUnit4ClassRunner.class)%0D%0A@WebAppConfiguration%0D%0A@ContextConfiguration(locations = %7B%22classpath:spring.xml%22, %22classpath:dispatcher-servlet.xml%22%7D)%0D%0Apublic class ValidateTest %7B%0D%0A%0D%0A%09@Autowired private WebApplicationContext wac;%0D%0A%09%0D%0A%09private MockMvc mockMvc;%0D%0A%09%0D%0A%09@Before%0D%0A%09public void before()%7B%0D%0A%09%09this.mockMvc = MockMvcBuilders.webAppContextSetup(wac).build();%0D%0A%09%7D%0D%0A%09%0D%0A%09@Test%0D%0A%09public void test() throws Exception%7B%0D%0A%09%09try%7B%0D%0A%09%09this.mockMvc.perform(post(%22/register%22).param(%22mobile%22, %22abc%22)).andDo(print());%0D%0A%09%09%7Dcatch(Exception e)%7B%0D%0A%09%09%09e.printStackTrace();%0D%0A%09%09%7D%0D%0A%09%7D%0D%0A%09%0D%0A%7D%0D%0A

add validation test