ObjectSample implements Sample<T>, Serializable { public T[] args() { return Arrays.copyOfRange(_sample, 0, _sample.length - 1); } @SafeVarargs  ObjectSample(final T... sample); @Override int arity(); @Override T argAt(final int index); T[] args(); @Override T result(); @Override int hashCode(); @Override boolean equals(final Object obj); @Override String toString();  }
@Test(dataProvider = "argsSamples") public void args(final ObjectSample<Integer> sample, final Integer[] result) { final Integer[] args = sample.args(); Assert.assertEquals(args.length, result.length); for (int i = 0; i < args.length; ++i) { Assert.assertEquals(args[i], result[i]); } }