title: JUnit5 - @CsvSource - converting source to POJO
body: <p>I have been following some online course on JUnit testing and I came across an example of <code>@CsvSource</code>. Following example works very well.</p>
  
  <pre><code>@DisplayName("CSV input test")
  @ParameterizedTest(name = DISPLAY_NAME_PLACEHOLDER + " - [" + INDEX_PLACEHOLDER + "] " + ARGUMENTS_PLACEHOLDER)
  @CsvSource({
          "FL, 1, 1",
          "OH, 2, 2",
          "MI, 3, 3"
  })
  void csvInputTest(String stateCode, int val1, int val2) {
      System.out.println(stateCode + " - " + val1 + " - " + val2);
  }
  </code></pre>
  
  <p>And I started wondering whether I could use some POJO instead of bazilion of arguments. So I created the POJO class with setters and getters and changed my method to: </p>
  
  <pre><code>void csvInputTest(StateInfo stateInfo) {
      System.out.println(stateInfo.getStateCode() + " - " + stateInfo.getVal1() + " - " + stateInfo.getVal2());
  }
  </code></pre>
  
  <p>but this resulted into: </p>
  
  <pre><code>org.junit.jupiter.api.extension.ParameterResolutionException: Error converting parameter at index 0: No implicit conversion to convert object of type java.lang.String to type StateInfo
  </code></pre>
  
  <p>I couldn't find any fields in <code>@CsvSource</code> to specify any converter so my question is - am I able to do so? Or do I have to stick to <code>N-arguments</code> approach?</p>