@Test
public void printPreContingencyViolations() throws Exception {

    StringWriter writer = new StringWriter();
    try {
        Security.printPreContingencyViolations(result, network, writer, formatterFactory, formatterConfig, null);
    } finally {
        writer.close();
    }
    assertEquals(String.join(System.lineSeparator(),
                             "Pre-contingency violations",
                             "Action,Equipment (1),End,Country,Base voltage,Violation type,Violation name,Value,Limit,abs(value-limit),Loading rate %",
                             "action1,,,,,,,,,,",
                             ",NHV1_NHV2_1,VLHV1,FR,380,CURRENT,Permanent limit,1100.0000,950.0000,150.0000,110.00"),
                 writer.toString().trim());
}