@Test
public void testException() throws IOException {

    String message = "Option exception";
    OptionException exception = mock(OptionException.class);
    when(exception.getMessage()).thenReturn(message);
    helpFormatter.setException(exception);
    Writer writer = mock(Writer.class);
    helpFormatter.exception(writer);
    verify(helpFormatter).divider(writer);
    verify(helpFormatter).line(writer, message);
    verify(helpFormatter).line(writer);
    verify(exception).getMessage();
}