<commit_before>package com.digi;

import com.digi.entity.request.AccountToVerify;
import com.digi.util.JsonUtil;
import org.hamcrest.core.IsNull;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.MediaType;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;
import org.springframework.test.web.servlet.RequestBuilder;


import static io.jsonwebtoken.lang.Strings.hasLength;
import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.content;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;


/**
 * Created by tymoshenkol on 07-Oct-16.
 */
@RunWith(SpringRunner.class)
@SpringBootTest
@AutoConfigureMockMvc
public class TwilioSendTest {
	@Autowired
	private MockMvc mockMvc;

	@Test
	public void testSendAdminSms () throws Exception {

		this.mockMvc.perform(get("/sms/admin"))
				.andDo(print())
				.andExpect(status().isOk())

				.andExpect(jsonPath("$.errorCode").value(IsNull.nullValue()))

				.andExpect(jsonPath("$.sid").value(IsNull.notNullValue()))
				.andExpect(jsonPath("$.sid").isString())
				.andExpect(jsonPath("$.sid").isNotEmpty())

				.andExpect(jsonPath("$.status").value("QUEUED"))
				.andExpect(jsonPath("$.numMedia").value("0"))
				.andExpect(jsonPath("$.numSegments").value("1"));<commit_msg>test: send message to admin<commit_after>package com.digi;

import org.hamcrest.core.IsNull;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMockMvc;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;
import org.springframework.test.web.servlet.MockMvc;

import static org.springframework.test.web.servlet.request.MockMvcRequestBuilders.get;
import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.print;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;


/**
 * Created by tymoshenkol on 07-Oct-16.
 */
@RunWith(SpringRunner.class)
@SpringBootTest
@AutoConfigureMockMvc
public class TwilioSendTest {
	@Autowired
	private MockMvc mockMvc;

	@Test
	public void testSendAdminSms () throws Exception {

		this.mockMvc.perform(get("/sms/admin"))
				.andDo(print())
				.andExpect(status().isOk())

				.andExpect(jsonPath("$.errorCode").value(IsNull.nullValue()))

				.andExpect(jsonPath("$.sid").value(IsNull.notNullValue()))
				.andExpect(jsonPath("$.sid").isString())
				.andExpect(jsonPath("$.sid").isNotEmpty())

				.andExpect(jsonPath("$.status").value("QUEUED"))
				.andExpect(jsonPath("$.numMedia").value("0"))
				.andExpect(jsonPath("$.numSegments").value("1"));
{'fraction_non_alphanumeric': 0.1402116402116402, 'fraction_numerical': 0.00411522633744856, 'mean_word_length': 6.0309917355371905, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6074943', 'n_tokens_mistral': 1100, 'n_tokens_neox': 1062, 'n_words': 139}