/*
 *
 * Copyright (c) 2006-2019, Speedment, Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); You may not
 * use this file except in compliance with the License. You may obtain a copy of
 * the License at:
 *
 * http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
 * License for the specific language governing permissions and limitations under
 * the License.
 */
package com.speedment.common.tuple;

import org.junit.jupiter.api.Test;

import java.util.NoSuchElementException;
import java.util.stream.IntStream;

import static com.speedment.common.tuple.TuplesTestUtil.SIZE;
import static org.junit.jupiter.api.Assertions.assertEquals;

/**
 * @author Emil Forslund
 * @since  1.0.5
 */
final class TuplesOfNullablesExtraTest {

    @Test
    void ofArray() {
        IntStream.range(0, SIZE).forEach(i -> {
            final TupleOfNullables tuple = TuplesTestUtil.createTupleOfNullableFilled(i);
            assertEquals(i, tuple.degree());

            final Integer[] array = TuplesTestUtil.array(i);
            for (int j = 0; j < i; j++) {
                final Integer expected = array[j];
                final Integer actual = (Integer) tuple.get(j).orElseThrow(NoSuchElementException::new);
                assertEquals(expected, actual);
            }

        });
    }

}
@@ -671,34 +671,255 @@
 ort 
-org.junit.jupiter.api.Test
+com.speedment.common.tuple.getter.TupleGetter;%0Aimport com.speedment.common.tuple.nullable.Tuple3OfNullables;%0Aimport org.junit.jupiter.api.Test;%0Aimport org.junit.jupiter.params.ParameterizedTest;%0Aimport org.junit.jupiter.params.provider.ValueSource
 ;%0A%0Ai
@@ -958,16 +958,43 @@
 eption;%0A
+import java.util.Optional;%0A
 import j
@@ -1143,16 +1143,75 @@
 tEquals;
+%0Aimport static org.junit.jupiter.api.Assertions.assertTrue;
 %0A%0A/**%0A *
@@ -1851,9 +1851,477 @@
 %0A    %7D%0A%0A
+    @ParameterizedTest%0A    @ValueSource(ints = %7B0, 1, 2%7D)%0A    void getter(int index) %7B%0A        final Tuple3OfNullables%3CInteger, Integer, Integer%3E tuple = TuplesOfNullables.ofNullables(0, 1, 2);%0A        final TupleGetter%3CTuple3OfNullables%3CInteger, Integer, Integer%3E, Optional%3CInteger%3E%3E getter = TupleOfNullables.getter(index);%0A        assertEquals(index, getter.index());%0A        assertEquals(index, getter.apply(tuple).orElseThrow(NoSuchElementException::new));%0A    %7D%0A
 %7D

Add test