CsvMappingResult { @Override public String toString() { return "CsvMappingResult{" + "result=" + result + ", error=" + error + '}'; } CsvMappingResult(TEntity result);  CsvMappingResult(CsvMappingError error); boolean isValid(); TEntity getResult(); CsvMappingError getError(); @Override String toString();  }
@Test public void testToString_NoThrow() { CsvMappingResult<Integer> no_error = new CsvMappingResult<Integer>(1); CsvMappingResult<Integer> error = new CsvMappingResult<Integer>(new CsvMappingError(0, null, null)); JUnitUtils.assertDoesNotThrow(() -> error.toString()); JUnitUtils.assertDoesNotThrow(() -> no_error.toString()); }