public <T extends Output<T>> void save(Path csvPath, Dataset<T> dataset, String responseName) throws IOException {
        save(csvPath, dataset, Collections.singleton(responseName));
    }
@Test
    public void testSave() throws IOException {
        URL path = CSVSaverTest.class.getResource("/org/tribuo/data/csv/test.csv");
        Set<String> responses = Collections.singleton("RESPONSE");
        //
        // Load the csv
        CSVLoader<MockOutput> loader = new CSVLoader<>(new MockOutputFactory());
        DataSource<MockOutput> source = loader.loadDataSource(path, responses);
        Dataset<MockOutput> before = new MutableDataset<>(source);
        //
        // Save the dataset
        CSVSaver saver = new CSVSaver();
        Path tmp = Files.createTempFile("foo","csv");
        tmp.toFile().deleteOnExit();
        saver.save(tmp, before, "RESPONSE");
        //
        // Reload and check that before & after are equivalent.
        MutableDataset<MockOutput> after = loader.load(tmp, responses);
        assertEquals(before.getData(), after.getData());
        assertEquals(before.getOutputIDInfo().size(), after.getOutputIDInfo().size());
        assertEquals(before.getFeatureIDMap().size(), after.getFeatureIDMap().size());
        for (int i = 0; i < before.size(); i++) {
            Example<MockOutput> b = before.getExample(i);
            Example<MockOutput> a = after.getExample(i);
            assertEquals(a,b);
        }
    }