package org.hisp.dhis.android.core.category;

import org.hisp.dhis.android.core.D2;
import org.hisp.dhis.android.core.calls.Call;
import org.hisp.dhis.android.core.common.D2Factory;
import org.hisp.dhis.android.core.data.database.AbsStoreTestCase;
import org.hisp.dhis.android.core.data.file.AssetsFileReader;
import org.hisp.dhis.android.core.data.server.Dhis2MockServer;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

import java.io.IOException;
import java.util.List;

import static junit.framework.Assert.assertFalse;

public class CategoryEndpointCallShould extends AbsStoreTestCase {

    private Dhis2MockServer dhis2MockServer;

    @Override
    @Before
    public void setUp() throws IOException {
        super.setUp();
        dhis2MockServer = new Dhis2MockServer(new AssetsFileReader());
    }

    @Override
    @After
    public void tearDown() throws IOException {
        super.tearDown();
        dhis2MockServer.shutdown();
    }

    @Test
    public void parse_category_successful() throws Exception {
        D2 d2 = D2Factory.create(dhis2MockServer.getBaseEndpoint(), databaseAdapter());
        Call<List<Category>> callEndpoint = CategoryEndpointCall
                .factory(d2.retrofit())
                .create(getGenericCallData(d2));
        dhis2MockServer.enqueueMockResponse("categories.json");

        List<Category> categories = callEndpoint.call();
        assertFalse(categories.isEmpty());
    }
}
@@ -39,16 +39,57 @@
 egory;%0A%0A
+import com.google.common.collect.Lists;%0A%0A
 import o
@@ -508,16 +508,42 @@
 eption;%0A
+import java.util.HashSet;%0A
 import j
@@ -1245,119 +1245,207 @@
 nt =
- CategoryEndpointCall%0A                .factory(d2.retrofit())%0A                .create(getGenericCallData(d2
+%0A                CategoryEndpointCall.FACTORY.create(getGenericCallData(d2), new HashSet%3C%3E(%0A                        Lists.newArrayList(%22vGs6omsRekv%22, %22KfdsGBcoiCa%22, %22cX5k9anHEHd%22, %22x3uo8LqiTBk%22)
 ));%0A
+%0A
     

Fix CategoryEndpointCallShould