package com.example.javamavenjunithelloworld;
import org.junit.Test;
import java.io.ByteArrayOutputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import static org.hamcrest.CoreMatchers.*;
import static org.junit.Assert.*;
/* This is to test eclipse
 chekcins into Github
*/


public class HelloTest {

    @Test
    public void testSayHello() {
        OutputStream os = new ByteArrayOutputStream();
        PrintStream stream = new PrintStream(os, true);

        Hello hi = new Hello();
        hi.sayHello(stream);

        assertThat(os.toString(), is(equalTo(Hello.HELLO + "\n")));
    }

    @Test
    public void testSayHelloAFewTimes() {
        OutputStream os = new ByteArrayOutputStream();
        PrintStream stream = new PrintStream(os, true);

        Hello hi = new Hello();
        hi.setTimes(3);
        hi.sayHello(stream);

        // Does it say "Hello!" three times?
        String goal = Hello.HELLO + "\n" + Hello.HELLO + "\n" + Hello.HELLO + "\n";
        assertThat(os.toString(), is(equalTo(goal)));
    }

    @Test(expected = IllegalArgumentException.class)
    public void testIllegalArgumentForHello21() {
        Hello hi = new Hello();
        hi.setTimes(Hello.MAXIMUM_AMOUNT_OF_TIMES + 1);
    }

    @Test(expected = IllegalArgumentException.class)
    public void testIllegalArgumentForHelloNegative() {
        Hello hi = new Hello();
        hi.setTimes(-1);
    }
}

@@ -592,16 +592,18 @@
 LLO + %22%5C
+r%5C
 n%22)));%0A 
@@ -933,32 +933,34 @@
 Hello.HELLO + %22%5C
+r%5C
 n%22 + Hello.HELLO
@@ -964,16 +964,18 @@
 LLO + %22%5C
+r%5C
 n%22 + Hel
@@ -987,16 +987,18 @@
 LLO + %22%5C
+r%5C
 n%22;%0A    

Update HelloTest.java