@@ -0,0 +1,2036 @@
+package com.gescc.hedwig.controller;%0A%0Aimport static org.hamcrest.Matchers.hasKey;%0Aimport static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.post;%0Aimport static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0Aimport org.junit.runner.RunWith;%0Aimport org.springframework.beans.factory.annotation.Autowired;%0Aimport org.springframework.http.MediaType;%0Aimport org.springframework.test.context.ContextConfiguration;%0Aimport org.springframework.test.context.junit4.SpringJUnit4ClassRunner;%0Aimport org.springframework.test.context.web.WebAppConfiguration;%0Aimport org.springframework.test.web.servlet.MockMvc;%0Aimport org.springframework.test.web.servlet.setup.MockMvcBuilders;%0Aimport org.springframework.web.context.WebApplicationContext;%0A%0A@RunWith(SpringJUnit4ClassRunner.class)%0A@WebAppConfiguration%0A@ContextConfiguration(locations = %22classpath:/applicationContext.xml%22)%0Apublic class SmsControllerTest %7B%0A%0A%09%0A%09private static final String TITLE = %22%ED%85%8C%EC%8A%A4%ED%8A%B8%22;%0A%0A%09private static final String APPLICATION_NAME = %22pandora%22;%0A%0A%09private static final String RECEIVER_NUMBER = %2201012345678%22;%0A%0A%09private static final String CONTENTS = %22%ED%85%8C%EC%8A%A4%ED%8A%B8 %EB%AC%B8%EC%9E%90%22;%0A%0A%09private static final String CALLBACK_URL = %22http://www.pandora.com/result%22;%0A%09%0A%09@Autowired%0A%09private WebApplicationContext wac;%0A%09%0A%09private MockMvc mockMvc;%0A%09%0A%09@Before%0A%09public void setup()%7B%0A%09%09this.mockMvc = MockMvcBuilders.webAppContextSetup(wac).build();%0A%09%7D%0A%09%0A%09@Test%0A%09public void insertSms() throws Exception %7B%0A%09%09String json = %22%7B%22 + %0A%09%09%09%09%09%09%22%5C%22title%5C%22 : %5C%22%22 + TITLE + %22%5C%22,%22 +%0A%09%09%09%09%09%09%22%5C%22receiver_number%5C%22 : %5C%22%22 + RECEIVER_NUMBER + %22%5C%22,%22 +%0A%09%09%09%09%09%09%22%5C%22application_name%5C%22 : %5C%22%22 + APPLICATION_NAME + %22%5C%22,%22 +%0A%09%09%09%09%09%09%22%5C%22contents%5C%22 : %5C%22%22 + CONTENTS + %22%5C%22,%22 +%0A%09%09%09%09%09%09%22%5C%22callback_url%5C%22 : %5C%22%22 + CALLBACK_URL + %22%5C%22%22 +%0A%09%09%09%09%09  %22%7D%22;%0A%09%09%0A%09%09this.mockMvc.perform(post(%22/sms%22).contentType(MediaType.APPLICATION_JSON).content(json))%0A%09%09.andExpect(jsonPath(%22$%22, hasKey(%22code%22)))%0A%09%09.andExpect(jsonPath(%22$.code%22).value(%22200%22))%0A%09%09.andReturn();%0A%09%7D%0A%09%0A%7D%0A%0A

Add SmsControllerTest