package com.buildndeploy.piglatin;

import static org.junit.Assert.*;

import java.util.ArrayList;
import java.util.List;

import org.junit.Test;

public class SentenceUtilTest {

	@Test
	public void testParse() {
		String sentence = "First third fifth!";
		List<String> pieces = SentenceUtil.toList(sentence);
		List<String> expected = new ArrayList<String>();
		expected.add("First");
		expected.add(" ");
		expected.add("third");
		expected.add(" ");
		expected.add("fifth");
		expected.add("!");
		
		assertEquals("Lists not the same", expected, pieces);
	}
	
}

@@ -92,16 +92,41 @@
 ayList;%0A
+import java.util.Arrays;%0A
 import j
@@ -381,151 +381,101 @@
 ng%3E(
-);
 %0A%09%09
-expected.add(%22First%22);%0A%09%09expected.add(%22 %22);%0A%09%09expected.add(%22third%22);%0A%09%09expected.add(%22 %22);%0A%09%09expected.add(%22fifth%22);%0A%09%09expected.add(%22!%22
+%09Arrays.asList(%0A%09%09%09%09new String%5B %5D%7B%22First%22, %22 %22, %22third%22, %22 %22, %22fifth%22, %22!%22%7D%0A%09%09%09)%0A%09%09
 );%0A%09%09
+%09%09
 %0A%09%09a

Simplified sentence parsing test code