### Question:
CsvIterator implements Iterator<String[]> { public String[] next() { String[] temp = nextLine; try { nextLine = reader.readNext(); } catch (IOException e) { throw new RuntimeException(e); } return temp; } CsvIterator(CsvReader reader); boolean hasNext(); String[] next(); void remove();  }### Answer:
@Test(expected = RuntimeException.class) public void readerExceptionCausesRunTimeException() throws IOException { when(mockReader.readNext()).thenThrow(new IOException("reader threw test exception")); iterator.next(); }
@Test public void initialReadReturnsStrings() { assertArrayEquals(STRINGS, iterator.next()); }