CsvMappingError { @Override public String toString() { return "CsvMappingError{" + "index=" + index + ", value='" + value + '\'' + ", message='" + message + '\'' + '}'; } CsvMappingError(int index, String value, String message); int getIndex(); String getValue(); String getMessage(); @Override String toString();  }
@Test public void testToString_NoThrow() { CsvMappingError[] errors = new CsvMappingError[] { new CsvMappingError(0, null, ""), new CsvMappingError(0, null, null), new CsvMappingError(0, "", null), new CsvMappingError(0, "", ""), }; for (CsvMappingError error : errors) { JUnitUtils.assertDoesNotThrow(() -> error.toString()); } }