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.server.RealServerMother;
import org.junit.Before;

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

import static junit.framework.Assert.assertFalse;

public class CategoryEndpointCallRealIntegrationShould extends AbsStoreTestCase {

    private D2 d2;

    @Override
    @Before
    public void setUp() throws IOException {
        super.setUp();
        d2 = D2Factory.create(RealServerMother.url, databaseAdapter());
    }

    //@Test
    public void call_categories_endpoint() throws Exception {
        d2.logIn(RealServerMother.user, RealServerMother.password).call();

        Call<List<Category>> categoryEndpointCall = CategoryEndpointCall.FACTORY.create(getGenericCallData(d2),
                new HashSet<String>());
        List<Category> categories = categoryEndpointCall.call();

        assertFalse(categories.isEmpty());
    }
}

@@ -40,16 +40,57 @@
 gory;%0A%0A%0A
+import com.google.common.collect.Lists;%0A%0A
 import o
@@ -1072,16 +1072,43 @@
 Set%3C
-String%3E(
+%3E(Lists.newArrayList(%22cX5k9anHEHd%22)
 ));%0A
@@ -1223,9 +1223,8 @@
 %0A    %7D%0A%7D
-%0A

Fix CategoryEndpointCallRealIntegrationShould