@@ -0,0 +1,886 @@
+package ru.matevosyan;%0A%0Aimport org.junit.Test;%0A%0Aimport java.util.ArrayList;%0A%0Aimport static org.hamcrest.MatcherAssert.assertThat;%0Aimport static org.hamcrest.Matchers.is;%0A%0A%0A/**%0A * Created by %D0%9F%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D1%82%D0%B5%D0%BB%D1%8C on 02.05.2017.%0A */%0Apublic class DimensionalIteratorTest %7B%0A    @Test%0A    public void whenPassTwoDimensionArrayThanIterateAndReturnTheSameValue() %7B%0A        int%5B%5D%5B%5D actualArray = new int%5B%5D%5B%5D%7B%7B1, 2%7D, %7B3, 4%7D%7D;%0A        DimensionalIterator dimensionalIterator = new DimensionalIterator(actualArray);%0A%0A        ArrayList%3CInteger%3E actualValue = new ArrayList%3C%3E();%0A%0A        ArrayList%3CInteger%3E expected = new ArrayList%3C%3E();%0A        expected.add(1);%0A        expected.add(2);%0A        expected.add(3);%0A        expected.add(4);%0A%0A        while (dimensionalIterator.hasNext()) %7B%0A            actualValue.add(dimensionalIterator.next());%0A        %7D%0A%0A        assertThat(actualValue, is(expected));%0A    %7D%0A%7D

add DimensionalIteratorTest