// Path: src/main/java/io/github/sskorol/utils/ReflectionUtils.java
// public static Method findDataSupplier(final ITestNGMethod testMethod) {
//     var annotationMetaData = testMethod.isTest()
//             ? getTestAnnotationMetaData(testMethod)
//             : getFactoryAnnotationMetaData(testMethod);
//     return getDataSupplierMethod(annotationMetaData._1, annotationMetaData._2);
// }


import io.github.sskorol.core.DataSupplier;
import io.vavr.Tuple;
import io.vavr.Tuple2;
import org.testng.ITestContext;
import org.testng.ITestNGMethod;
import java.lang.reflect.Method;
import java.util.function.Function;
import static io.github.sskorol.utils.ReflectionUtils.findDataSupplier;
import static io.vavr.API.*;
import static java.util.Arrays.stream;
import static java.util.Optional.ofNullable;
package io.github.sskorol.model;




/**
 * Internal entity required for storing TestNG meta data retrieved from listeners.
 */
public class TestNGMethod {

    private final ITestNGMethod testMethod;
    private final Method dataSupplierMethod;
    private final ITestContext context;
    private final DataSupplier dataSupplier;

    public TestNGMethod(final ITestContext context, final ITestNGMethod testMethod) {
        this.context = context;
        this.testMethod = testMethod;
// Path: src/main/java/io/github/sskorol/utils/ReflectionUtils.java
// public static Method findDataSupplier(final ITestNGMethod testMethod) {
//     var annotationMetaData = testMethod.isTest()
//             ? getTestAnnotationMetaData(testMethod)
//             : getFactoryAnnotationMetaData(testMethod);
//     return getDataSupplierMethod(annotationMetaData._1, annotationMetaData._2);
// }


// Path: src/main/java/io/github/sskorol/model/TestNGMethod.java
import io.github.sskorol.core.DataSupplier;
import io.vavr.Tuple;
import io.vavr.Tuple2;
import org.testng.ITestContext;
import org.testng.ITestNGMethod;
import java.lang.reflect.Method;
import java.util.function.Function;
import static io.github.sskorol.utils.ReflectionUtils.findDataSupplier;
import static io.vavr.API.*;
import static java.util.Arrays.stream;
import static java.util.Optional.ofNullable;

package io.github.sskorol.model;




/**
 * Internal entity required for storing TestNG meta data retrieved from listeners.
 */
public class TestNGMethod {

    private final ITestNGMethod testMethod;
    private final Method dataSupplierMethod;
    private final ITestContext context;
    private final DataSupplier dataSupplier;

    public TestNGMethod(final ITestContext context, final ITestNGMethod testMethod) {
        this.context = context;
        this.testMethod = testMethod;
        this.dataSupplierMethod = findDataSupplier(testMethod);