package com.rackspacecloud.blueflood.service;

import com.rackspacecloud.blueflood.utils.Util;
import org.junit.Assert;
import org.junit.Ignore;
import org.junit.Test;

import java.util.Collection;
import java.util.Collections;

public class RollupServiceTest {

    @Test
    public void testRollupServiceWithDefaultConfigs() {

        Configuration config = Configuration.getInstance();
        final Collection<Integer> shards = Collections.unmodifiableCollection(
                Util.parseShards(config.getStringProperty(CoreConfig.SHARDS)));
        final String zkCluster = config.getStringProperty(CoreConfig.ZOOKEEPER_CLUSTER);
        final ScheduleContext rollupContext = "NONE".equals(zkCluster) ?
                new ScheduleContext(System.currentTimeMillis(), shards) :
                new ScheduleContext(System.currentTimeMillis(), shards, zkCluster);

        RollupService service = new RollupService(rollupContext);

        Assert.assertNotNull(service);

        service.run(null, 120000L); // default SCHEDULE_POLL_PERIOD is 60 seconds

        Assert.assertTrue(true);
    }
}

@@ -109,23 +109,19 @@
 nit.
-Assert;
+*;%0A
 %0Aimport 
 org.
@@ -120,49 +120,28 @@
 ort 
-org.junit.Ignore;%0Aimport org.junit.Test;%0A
+java.io.IOException;
 %0Aimp
@@ -227,24 +227,242 @@
 viceTest %7B%0A%0A
+    @Before%0A    public void setup() throws IOException %7B%0A        Configuration.getInstance().init();%0A    %7D%0A%0A    @After%0A    public void tearDown() throws IOException %7B%0A        Configuration.getInstance().init();%0A    %7D%0A%0A
     @Test%0A  

Clean up the configuration before and after the test.