import org.junit.Test;
import xyz.aornice.tofq.Cargo;
import xyz.aornice.tofq.Topic;
import xyz.aornice.tofq.depostion.CargoDeposition;
import xyz.aornice.tofq.depostion.support.LocalDeposition;
import xyz.aornice.tofq.utils.TopicCenter;
import xyz.aornice.tofq.utils.impl.LocalTopicCenter;

/**
 * Created by drfish on 27/04/2017.
 */
public class FileExtensionTest {
    @Test
    public void fileExtend() {
        CargoDeposition deposition = LocalDeposition.getInstance();
//        deposition.start();
        TopicCenter topicCenter = LocalTopicCenter.getInstance();
        String topicName = "test_topic1";
//        topicCenter.remove(topicName);
        topicCenter.register(topicName);
        Topic topic = topicCenter.getTopic(topicName);
        for(int i=0;i<100000;i++) {
            deposition.write(new Cargo(topic, topic.incrementAndGetId(), ("message" + i).getBytes()));
        }
    }
}

@@ -1,12 +1,59 @@
+import deposition.LocalDepositionNonSingleton;%0A
 import org.j
@@ -63,16 +63,16 @@
 t.Test;%0A
-
 import x
@@ -180,67 +180,8 @@
 on;%0A
-import xyz.aornice.tofq.depostion.support.LocalDeposition;%0A
 impo
@@ -427,16 +427,20 @@
 sition =
+ new
  LocalDe
@@ -451,26 +451,24 @@
 tion
-.getInstance
+NonSingleton
 ();%0A
-//
     
@@ -751,26 +751,33 @@
  for
+ 
 (int i
-=0;i%3C
+ = 0; i %3C 
 100000;
+ 
 i++)
@@ -882,16 +882,16 @@
 es()));%0A
-
         
@@ -892,16 +892,57 @@
       %7D%0A
+        deposition.shutdownGracefully();%0A
     %7D%0A%7D%0A

Fix deposition singleton problem in FileExtensionTest