DatasetSplitSet implements IDatasetSplitSet<D> { public void addSplit(final List<D> split) { this.splits.add(split); } DatasetSplitSet();  DatasetSplitSet(final IDatasetSplitSet<D> set);  DatasetSplitSet(final List<List<D>> splits); void addSplit(final List<D> split); @Override int getNumberOfSplits(); @Override int getNumberOfFoldsPerSplit(); int getNumberOfFoldsForSplit(final int pos); @Override List<D> getFolds(final int splitId);  }
@Test public void testAddSplit() { List<ILabeledDataset<ILabeledInstance>> newSplit = Arrays.asList(d, d, d, d); this.splitSet.addSplit(newSplit); assertEquals("Number of splits does not match", this.testSplits.size() + 1, this.splitSet.getNumberOfSplits()); assertEquals("Last split does not match the shape of the added split", this.splitSet.getNumberOfFoldsForSplit(this.splitSet.getNumberOfSplits() - 1), newSplit.size()); }