@@ -0,0 +1,1621 @@
+/*%0A * Java Genetic Algorithm Library (@__identifier__@).%0A * Copyright (c) @__year__@ Franz Wilhelmst%C3%B6tter%0A *%0A * This library is free software; you can redistribute it and/or%0A * modify it under the terms of the GNU Lesser General Public%0A * License as published by the Free Software Foundation; either%0A * version 2.1 of the License, or (at your option) any later version.%0A *%0A * This library is distributed in the hope that it will be useful,%0A * but WITHOUT ANY WARRANTY; without even the implied warranty of%0A * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU%0A * Lesser General Public License for more details.%0A *%0A * You should have received a copy of the GNU Lesser General Public%0A * License along with this library; if not, write to the Free Software%0A * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA%0A *%0A * Author:%0A *     Franz Wilhelmst%C3%B6tter (franz.wilhelmstoetter@gmx.at)%0A *%0A */%0Apackage org.jenetics.util;%0A%0Aimport java.util.concurrent.atomic.AtomicInteger;%0A%0Aimport org.testng.Assert;%0Aimport org.testng.annotations.Test;%0A%0A/**%0A * @author %3Ca href=%22mailto:franz.wilhelmstoetter@gmx.at%22%3EFranz Wilhelmst%C3%B6tter%3C/a%3E%0A * @version %3Cem%3E$Date: 2013-06-21 $%3C/em%3E%0A */%0Apublic abstract class SeqTestBase%3CT%3E %7B%0A%0A%09protected abstract Seq%3CT%3E newSeq(final int length);%0A%0A%09@Test%0A%09public void forEach() %7B%0A%09%09final Seq%3CT%3E seq = newSeq(1000);%0A%0A%09%09final AtomicInteger counter = new AtomicInteger(0);%0A%09%09seq.forEach(new Function%3CT, Void%3E() %7B%0A%09%09%09@Override public Void apply(final T value) %7B%0A%09%09%09%09counter.incrementAndGet();%0A%09%09%09%09return null;%0A%09%09%09%7D%0A%09%09%7D);%0A%0A%09%09Assert.assertEquals(counter.get(), seq.length());%0A%09%7D%0A%0A%7D%0A

Add test base class for 'Seq' interface.