@@ -0,0 +1,1677 @@
+package org.rdswitchboard.harvesters.pmh;%0A%0Aimport org.junit.Assert;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0Aimport java.io.FileInputStream;%0Aimport java.util.Map;%0Aimport java.util.Properties;%0Aimport org.junit.Rule;%0Aimport org.junit.rules.TemporaryFolder;%0Aimport static org.junit.Assert.*;%0A%0A%0Apublic class HarvesterTest %7B%0A%0A    @Rule%0A    public TemporaryFolder testFolder = new TemporaryFolder();%0A%0A    private Properties figshareProperties = new Properties();%0A%0A    @org.junit.Before%0A    public void setUp() throws Exception %7B%0A        File tempFolder = testFolder.newFolder(%22testHarvest%22);%0A        figshareProperties.setProperty(%22url%22, %22https://api.figshare.com/v2/oai%22);%0A        figshareProperties.setProperty(%22name%22, %22figshare%22);%0A        figshareProperties.setProperty(%22metadata%22, %22rdf%22);%0A        figshareProperties.setProperty(%22folder%22, testFolder.getRoot().toString());%0A        System.out.println(%22Test folder: %22 + testFolder.getRoot());%0A    %7D%0A%0A    @org.junit.After%0A    public void tearDown() throws Exception %7B%0A        //nothing to do%0A    %7D%0A%0A    @org.junit.Test%0A    public void testListSetsFromFigshare() throws Exception %7B%0A        //nothing to do%0A        Harvester harvester = new Harvester(figshareProperties);%0A        harvester.identify();%0A        Map%3CString, String%3E mapSets = harvester.listSets();%0A%0A        System.out.println(%22Number of sets: %22 + mapSets.size());%0A%0A        for (Map.Entry%3CString, String%3E entry : mapSets.entrySet()) %7B%0A                System.out.println(entry);%0A        %7D%0A%0A        if (mapSets.size()==10) Assert.fail(%22Only 10 sets have been listed. Most likely, Harvester only loaded the first page, and the resume token does not work%22);%0A%0A    %7D%0A%0A%7D

add test file