Here is my test:
@Test
public void testAddPaperConfirm()
{
String input = "P\n" +
"The Life of Geoff the Platypus";
InputStream testInput = new ByteArrayInputStream(input.getBytes());
System.setOut(new PrintStream(testOutput));
System.setIn(testInput);
testReviewSystem.main(new String[] {});
assertEquals(testOutput.toString(), "What do you want to do?\n" +
"O = Overview, P = Add Paper, R = Add Review, [num] = Detail of that paper, X = exit\n" +
"What is the title of the paper?\n" +
"[Paper added]\n"
+ "What do you want to do?\n" +
"O = Overview, P = Add Paper, R = Add Review, [num] = Detail of that paper, X = exit\n");
}