package com.twu.biblioteca;


import org.junit.Test;
import static org.junit.Assert.assertEquals;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;

public class BibliotecaAppTest {


    @Test
    public void testWelcomeMessage() {
        ByteArrayOutputStream outContent = new ByteArrayOutputStream();
        System.setOut(new PrintStream(outContent));

        BibliotecaApp.main(new String[] {});
        assertEquals("Welcome to Biblioteca!\n", outContent.toString());
    }
}

@@ -156,16 +156,99 @@
 tStream;
+%0Aimport java.lang.StringBuilder;%0Aimport java.util.List;%0Aimport java.util.ArrayList;
 %0A%0Apublic
@@ -275,17 +275,16 @@
 Test %7B%0A%0A
-%0A
     @Tes
@@ -309,26 +309,589 @@
 test
-WelcomeMessage() %7B
+BibliotecaStartup() %7B%0A        List%3CString%3E bookList = new ArrayList%3CString%3E();%0A        bookList.add(%22Test-Driven Development By Example%22);%0A        bookList.add(%22The Agile Samurai%22);%0A        bookList.add(%22Head First Java%22);%0A        bookList.add(%22Don't Make Me Think, Revisited: A Common Sense Approach to Web Usability%22);%0A%0A        StringBuilder startupOutput = new StringBuilder();%0A        startupOutput.append(%22Welcome to Biblioteca!%5Cn%22);%0A        startupOutput.append(%22Book list:%5Cn%22);%0A        for (String book : bookList) %7B%0A            startupOutput.append(book + %22%5Cn%22);%0A        %7D%0A
 %0A   
@@ -1011,17 +1011,16 @@
 tent));%0A
-%0A
         
@@ -1056,16 +1056,17 @@
 %5B%5D %7B%7D);%0A
+%0A
         
@@ -1082,34 +1082,32 @@
 als(
-%22Welcome to Biblioteca!%5Cn%22
+startupOutput.toString()
 , ou

Test display welcome and book list on startup