@@ -0,0 +1,1520 @@
+package org.grouplens.lenskit.eval.data.traintest;%0A%0Aimport org.grouplens.lenskit.data.dao.EventCollectionDAO;%0Aimport org.grouplens.lenskit.data.event.Rating;%0Aimport org.grouplens.lenskit.eval.data.GenericDataSource;%0Aimport org.junit.Test;%0A%0Aimport java.util.Collections;%0Aimport java.util.List;%0A%0Aimport static net.java.quickcheck.generator.CombinedGenerators.uniqueValues;%0Aimport static net.java.quickcheck.generator.CombinedGeneratorsIterables.someNonEmptyLists;%0Aimport static net.java.quickcheck.generator.PrimitiveGenerators.nonEmptyStrings;%0Aimport static org.hamcrest.Matchers.contains;%0Aimport static org.hamcrest.Matchers.equalTo;%0Aimport static org.junit.Assert.assertThat;%0A%0Apublic class GenericTTDataBuilderTest %7B%0A    @Test%0A    public void testAttributeOrder() %7B%0A        for (List%3CString%3E strings: someNonEmptyLists(uniqueValues(nonEmptyStrings(), 10))) %7B%0A            GenericTTDataBuilder bld = new GenericTTDataBuilder(nonEmptyStrings().next());%0A            bld.setTrain(new GenericDataSource(%22train%22, EventCollectionDAO.create(Collections.%3CRating%3EemptyList())));%0A            bld.setTest(new GenericDataSource(%22test%22, EventCollectionDAO.create(Collections.%3CRating%3EemptyList())));%0A            for (String str: strings) %7B%0A                bld.setAttribute(str, nonEmptyStrings().next());%0A            %7D%0A            TTDataSet ds = bld.build();%0A            assertThat(ds.getAttributes().size(), equalTo(strings.size()));%0A            assertThat(ds.getAttributes().keySet(), contains(strings.toArray()));%0A        %7D%0A    %7D%0A%7D%0A

Add tests for bug #630