package by.binarylifestyle.exception.wrapper.impl.support;

import by.binarylifestyle.exception.wrapper.api.support.VarargsFunction;
import by.binarylifestyle.exception.wrapper.support.TestData;
import org.junit.Assert;
import org.junit.Test;

import java.util.function.Function;

public class VarargsFunctionTests {
    @Test
    public void applyTest() {
        Integer[] integers = {1, 2, 3};
        Function<Integer[], Integer> function = TestData.function();
        VarargsFunction<Integer, Integer> varargsFunction = new VarargsFunction<>(function);

        Integer actualAsVarargs = varargsFunction.apply(1, 2, 3);
        Integer actualAsFunction = varargsFunction.apply(integers);
        Integer expected = function.apply(integers);

        Assert.assertEquals(expected, actualAsVarargs);
        Assert.assertEquals(expected, actualAsFunction);
    }
}

@@ -575,25 +575,16 @@
 r actual
-AsVarargs
  = varar
@@ -614,76 +614,8 @@
 3);%0A
-        Integer actualAsFunction = varargsFunction.apply(integers);%0A
     
@@ -712,74 +712,8 @@
 tual
-AsVarargs);%0A        Assert.assertEquals(expected, actualAsFunction
 );%0A 

Remove redundant test