@@ -0,0 +1,2171 @@
+package no.ssb.vtl.test;%0A%0Aimport com.google.common.collect.ForwardingObject;%0Aimport com.google.common.collect.ImmutableMap;%0Aimport com.google.common.collect.Lists;%0Aimport no.ssb.vtl.model.Component;%0Aimport no.ssb.vtl.model.DataPoint;%0Aimport no.ssb.vtl.model.DataStructure;%0Aimport no.ssb.vtl.model.Dataset;%0Aimport no.ssb.vtl.model.StaticDataset;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Collections;%0Aimport java.util.List;%0Aimport java.util.Map;%0Aimport java.util.Optional;%0Aimport java.util.Random;%0Aimport java.util.stream.Collectors;%0Aimport java.util.stream.Stream;%0A%0Aimport static com.google.common.base.Preconditions.checkNotNull;%0A%0A/**%0A *%0A */%0Apublic class TestDataset extends ForwardingObject implements Dataset %7B%0A%0A    private final Random random;%0A    private final StaticDataset delegate;%0A%0A    private boolean variableSize;%0A    private boolean shuffleData;%0A    private boolean shuffleStructure;%0A%0A    public TestDataset(Random random, StaticDataset dataset) %7B%0A        this.delegate = checkNotNull(dataset);%0A        this.random = checkNotNull(random);%0A    %7D%0A%0A    @Override%0A    public Stream%3CDataPoint%3E getData() %7B%0A        Stream%3CDataPoint%3E stream = delegate().getData();%0A%0A        if (shuffleStructure)%0A            // TODO%0A%0A        if (!shuffleData)%0A            return stream;%0A%0A        List%3CDataPoint%3E collect = stream.collect(Collectors.toList());%0A        Collections.shuffle(collect, this.random);%0A        return collect.stream();%0A%0A    %7D%0A%0A    @Override%0A    public Optional%3CMap%3CString, Integer%3E%3E getDistinctValuesCount() %7B%0A        return Optional.empty();%0A    %7D%0A%0A    @Override%0A    public Optional%3CLong%3E getSize() %7B%0A        return Optional.empty();%0A    %7D%0A%0A    @Override%0A    public DataStructure getDataStructure() %7B%0A        DataStructure structure = delegate().getDataStructure();%0A        if (!shuffleStructure)%0A            return structure;%0A%0A        ArrayList%3CMap.Entry%3CString, Component%3E%3E entries = Lists.newArrayList(structure.entrySet());%0A        Collections.shuffle(entries, this.random);%0A        return DataStructure.copyOf(ImmutableMap.copyOf(entries)).build();%0A    %7D%0A%0A    @Override%0A    protected StaticDataset delegate() %7B%0A        return this.delegate;%0A    %7D%0A%7D%0A

Add a test utility that randomize datasets