import static org.junit.Assert.*; import org.junit.After; import org.junit.Before; import org.junit.Test; /** * The test class MainTest. * * @author (your name) * @version (a version number or a date) */ public class MainTest extends Main { String userInput = in.nextLine(); @Test public void MainTest() {userInput = "Alice"; String expected = "Hello Alice!"; String actual = (""+userInput); assertEquals(expected, actual); } @Test public void SecondTest() {userInput = "Alice"; String expected = "Hello Bob!"; String actual = (""+userInput); assertEquals(expected, actual); } /** * Sets up the test fixture. * * Called before every test case method. */ @Before public void setUp() { } /** * Tears down the test fixture. * * Called after every test case method. */ @After public void tearDown() { } }