Question: PROBLEM: The same test method is used for different data. Depending on input data, test method body should expect 'equals' or 'not equal' in asserts.

RESEARCH: `@ParameterizedTest` allows using `@CsvSource` as test method input data:

```java
@ParameterizedTest
@CsvSource({ "foo, 1", "bar, 2", "'baz, qux', 3" })
void testWithCsvSource(String first, int second) {
  assertNotNull(first);
  assertNotEquals(0, second);
}

```

This could be achieved by two opposite test methods, but their code would be much similar.

QUESTION: How to identify in the method body, **which set of CsvSource input parameters is currently used**?

Answer: 
You can create two test methods with different `CsvSource` and then delegate to a common test method.

```java
@ParameterizedTest
@CsvSource({ "foo, 1", "bar, 2", "'baz, qux', 3" })
void testWithCsvSource(String first, int second) {
  internalTest(first, second);
}

@ParameterizedTest
@CsvSource({ "foo2, 1", "bar2, 2", "'baz2, qux2', 3" })
void testWithCsvSource2(String first, int second) {
  internalTest(first, second);
}

private void internalTest(String first, int second) {
  assertNotNull(first);
  assertNotEquals(0, second);
}

```
An optimal solution so far is adding index as first parameter for each set:

```java
@ParameterizedTest
@CsvSource({
  "0, foo, 11", // Expected to be valid.
  "1, bar, 22",  // Expected to be invalid.
  "2, 'baz, qux', 33" }) // Expected to be invalid.
void testWithCsvSource(
  int parametersIndex, 
  String first, 
  int second) {

  Assertions.assertEquals(
    second.validate(),
    parametersIndex == 0); // Expected true for 0 index parameters only.
}

```