@Test
public void testUnauthorizedColspan() throws IOException {

    thrown.expect(IllegalArgumentException.class);
    thrown.expectMessage("You have exceded the authorized colspan");
    ByteArrayOutputStream bos = new ByteArrayOutputStream();
    try (Writer writer = new OutputStreamWriter(bos, StandardCharsets.UTF_8);
         AsciiTableFormatter formatter = new AsciiTableFormatter(writer,  null, config,
            new Column("column1").setColspan(4).setHorizontalAlignment(HorizontalAlignment.CENTER),
            new Column("column2").setColspan(2).setHorizontalAlignment(HorizontalAlignment.CENTER))) {
        formatter.writeCell("Line:1 Cell:1", 1)
                .writeCell("Line:1 Cell:2", 1)
                .writeCell("Line:1 Cell:3", 1)
                .writeCell("Line:1 Cell:4", 2)
                .writeCell("Line:1 Cell:5", 1);
    }
}