### Question:
Shell { String processReadLine(final String readLine) { String result = readLine.trim(); if (!result.isEmpty()) { if (result.charAt(0) != '@') { result = "@" + result; } if (result.charAt(result.length() - 1) != '.') { result = result + " ."; } } return result; } Shell(final Interpreter interpreter); void run(final LineReader lineReader, final String prompt); Command readCommand(final LineReader lineReader, final String prompt); void exitShell(); Set<String> getCommands();  }### Answer:
@Test public void processReadLine_blank() { final Shell shell = new Shell(Mockito.mock(Interpreter.class)); final String processedReadLine = shell.processReadLine(" "); assertEquals("", processedReadLine); }
@Test public void processReadLine_startsWithAt() { final Shell shell = new Shell(Mockito.mock(Interpreter.class)); final String processedReadLine = shell.processReadLine(" @ "); assertEquals("@ .", processedReadLine); }
@Test public void processReadLine_endsWithStop() { final Shell shell = new Shell(Mockito.mock(Interpreter.class)); final String processedReadLine = shell.processReadLine(" . "); assertEquals("@.", processedReadLine); }
@Test public void processReadLine_startsWithAtEndsWithStop() { final Shell shell = new Shell(Mockito.mock(Interpreter.class)); final String processedReadLine = shell.processReadLine(" @. "); assertEquals("@.", processedReadLine); }
@Test public void processReadLine_doesNotStartWithAt_DoesNotEndWithStop() { final Shell shell = new Shell(Mockito.mock(Interpreter.class)); final String processedReadLine = shell.processReadLine(" .@ "); assertEquals("@.@ .", processedReadLine); }