<commit_before>package edu.wisc.doit.tcrypt;

import edu.wisc.doit.tcrypt.services.TCryptServices;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.springframework.web.servlet.ModelAndView;
import static org.junit.Assert.assertEquals;

@RunWith(MockitoJUnitRunner.class)
public class EncryptControllerTest {
	@InjectMocks private EncryptController encryptController;
	@Mock private TCryptServices tcryptServices;
	@Mock private AuthenticationState as;
	
	@Test
	public void shouldHandleSlashHandleMapping() throws Exception{
		ModelAndView handleRequest = encryptController.encryptTextInit();
		assertEquals(handleRequest.getViewName(),"encryptTokenBefore");
	}
	
	@Test
	public void testSubmittingEncryption() throws Exception {
/*
		when(keyKeeper.getKeyLocationToDownloadFromServer("serviceNameTest", as.getCurrentUserName(), "public")).thenReturn("test");
		ModelAndView mav = encryptController.encryptText("serviceNameTest","<PASSWORD>SecretPassword");
		//TODO: wait for API to be complete so controller isn't doing the file processing.
*/
		//assertEquals(mav.getViewName(),"encryptTokenResult");
	}
}<commit_msg>[TCRYPT-16] - Removed all references to the AuthenticationState class.<commit_after>package edu.wisc.doit.tcrypt;

import edu.wisc.doit.tcrypt.services.TCryptServices;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.mockito.InjectMocks;
import org.mockito.Mock;
import org.mockito.runners.MockitoJUnitRunner;
import org.springframework.web.servlet.ModelAndView;
import static org.junit.Assert.assertEquals;

@RunWith(MockitoJUnitRunner.class)
public class EncryptControllerTest {
	@InjectMocks private EncryptController encryptController;
	@Mock private TCryptServices tcryptServices;
	
	@Test
	public void shouldHandleSlashHandleMapping() throws Exception{
		ModelAndView handleRequest = encryptController.encryptTextInit();
		assertEquals(handleRequest.getViewName(),"encryptTokenBefore");
	}
	
	@Test
	public void testSubmittingEncryption() throws Exception {
/*
		when(keyKeeper.getKeyLocationToDownloadFromServer("serviceNameTest", as.getCurrentUserName(), "public")).thenReturn("test");
		ModelAndView mav = encryptController.encryptText("serviceNameTest","<PASSWORD>");
		//TODO: wait for API to be complete so controller isn't doing the file processing.
*/
		//assertEquals(mav.getViewName(),"encryptTokenResult");
	}
}
{'fraction_non_alphanumeric': 0.10321285140562249, 'fraction_numerical': 0.0008032128514056225, 'mean_word_length': 7.11400651465798, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5565119', 'n_tokens_mistral': 760, 'n_tokens_neox': 728, 'n_words': 147}