usergrid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From toddn...@apache.org
Subject [1/2] Renamed interfaces to be clearer
Date Thu, 05 Dec 2013 17:35:04 GMT
Updated Branches:
  refs/heads/two-point-o-eventbus 56c415f2b -> ce2bfd82d


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerFactoryTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerFactoryTest.java
b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerFactoryTest.java
new file mode 100644
index 0000000..db79db7
--- /dev/null
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerFactoryTest.java
@@ -0,0 +1,52 @@
+package org.apache.usergrid.persistence.collection;
+
+
+import org.junit.Rule;
+import org.junit.Test;
+
+import org.apache.usergrid.persistence.collection.guice.TestCollectionModule;
+import org.apache.usergrid.persistence.collection.impl.EntityCollectionImpl;
+import org.apache.usergrid.persistence.model.util.UUIDGenerator;
+
+import com.google.guiceberry.junit4.GuiceBerryRule;
+import com.google.inject.Inject;
+import com.google.inject.ProvisionException;
+
+import static org.junit.Assert.assertNotNull;
+
+
+/**
+ * Basic tests
+ *
+ * @author tnine
+ */
+public class EntityCollectionManagerFactoryTest {
+
+
+    @Rule
+    public final GuiceBerryRule guiceBerry = new GuiceBerryRule( TestCollectionModule.class
);
+
+
+    @Inject
+    private EntityCollectionManagerFactory entityCollectionManagerFactory;
+
+
+
+
+    @Test
+    public void validInput() {
+
+        EntityCollectionImpl context =
+                new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" );
+
+        EntityCollectionManager entityCollectionManager = entityCollectionManagerFactory.createCollectionManager(
context );
+
+        assertNotNull( "A collection manager must be returned", entityCollectionManager );
+    }
+
+
+    @Test( expected = ProvisionException.class )
+    public void nullInput() {
+           EntityCollectionManager entityCollectionManager = entityCollectionManagerFactory.createCollectionManager(
null );
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerTest.java
b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerTest.java
new file mode 100644
index 0000000..13b2834
--- /dev/null
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/EntityCollectionManagerTest.java
@@ -0,0 +1,53 @@
+package org.apache.usergrid.persistence.collection;
+
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+
+/** @author tnine */
+public class EntityCollectionManagerTest {
+//
+//    @Test
+//    public void create(){
+//
+//        EventStage mockEventStage = mock(EventStage.class);
+//
+//        StagePipeline createPipeline = mock(StagePipeline.class);
+//        StagePipeline updatePipeline = mock(StagePipeline.class);
+//        StagePipeline deletePipeline = mock(StagePipeline.class);
+//        StagePipeline loadPipeline = mock(StagePipeline.class);
+//
+//
+//
+//        //mock up returning the first stage
+//        when(createPipeline.first()).thenReturn( mockEventStage );
+//
+//
+//        EntityCollection context = new EntityCollectionImpl( UUIDGenerator.newTimeUUID(),
UUIDGenerator.newTimeUUID(), "test" );
+//
+//        EntityCollectionManager collectionManager = new EntityCollectionManagerImpl(createPipeline,
updatePipeline, deletePipeline, loadPipeline, context);
+//
+//        Entity create = new Entity();
+//
+//        MvccEntity mvccEntity = mock(MvccEntity.class);
+//
+//
+//        Entity returned = collectionManager.create( create );
+//
+//        //verify the first stage was asked for
+//        verify(createPipeline).first();
+//
+//        ArgumentCaptor<ExecutionContext> contextArg = ArgumentCaptor.forClass(ExecutionContext.class);
+//
+//        //verify the first perform stage was invoked
+//        verify( mockEventStage ).performStage( contextArg.capture() );
+//
+//        //verify we set the passed entity into the ExecutionContext
+//        assertEquals("Entity should be present in the write context", create, contextArg.getValue().getMessage(
Entity.class ));
+//
+//    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/entity/impl/MvccLogEntryImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/entity/impl/MvccLogEntryImplTest.java
b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/entity/impl/MvccLogEntryImplTest.java
index 947541f..642fec5 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/entity/impl/MvccLogEntryImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/entity/impl/MvccLogEntryImplTest.java
@@ -5,11 +5,8 @@ import java.util.UUID;
 
 import org.junit.Test;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
-import org.apache.usergrid.persistence.collection.impl.CollectionContextImpl;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccLogEntry;
 import org.apache.usergrid.persistence.collection.mvcc.entity.Stage;
-import org.apache.usergrid.persistence.collection.mvcc.entity.impl.MvccLogEntryImpl;
 import org.apache.usergrid.persistence.model.util.UUIDGenerator;
 
 import static org.junit.Assert.assertEquals;
@@ -21,27 +18,18 @@ public class MvccLogEntryImplTest {
 
     @Test( expected = NullPointerException.class )
     public void entityIdRequired() {
-        final CollectionContext context =
-                new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" );
-
         new MvccLogEntryImpl( null, UUIDGenerator.newTimeUUID(), Stage.ACTIVE );
     }
 
 
     @Test( expected = NullPointerException.class )
     public void versionRequired() {
-        final CollectionContext context =
-                new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" );
-
         new MvccLogEntryImpl( UUIDGenerator.newTimeUUID(), null, Stage.ACTIVE );
     }
 
 
     @Test( expected = NullPointerException.class )
     public void stageRequired() {
-        final CollectionContext context =
-                new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" );
-
         new MvccLogEntryImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(), null
);
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/CreateTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/CreateTest.java
b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/CreateTest.java
index 54fadc9..7322d74 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/CreateTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/CreateTest.java
@@ -7,11 +7,10 @@ import java.util.concurrent.ExecutionException;
 import org.junit.Test;
 import org.mockito.ArgumentCaptor;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.mvcc.entity.CollectionEventBus;
 import org.apache.usergrid.persistence.collection.mvcc.stage.ExecutionContext;
 import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
-import org.apache.usergrid.persistence.collection.mvcc.stage.impl.write.Create;
 import org.apache.usergrid.persistence.collection.service.TimeService;
 import org.apache.usergrid.persistence.collection.service.UUIDService;
 import org.apache.usergrid.persistence.model.entity.Entity;
@@ -51,7 +50,7 @@ public class CreateTest {
         //mock the uuid service
         when( uuidService.newTimeUUID() ).thenReturn( newEntityId );
 
-        final CollectionEventBus eventBus = mock(CollectionEventBus.class);
+        final CollectionEventBus eventBus = mock( CollectionEventBus.class );
 
         Result result = new Result();
 
@@ -65,7 +64,7 @@ public class CreateTest {
         final Entity entity = new Entity();
 
 
-        final CollectionContext context = mock(CollectionContext.class);
+        final EntityCollection context = mock(EntityCollection.class);
 
         EventCreate createEvent = new EventCreate(context,  entity, result );
         create.performStage( createEvent );

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/StartWriteTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/StartWriteTest.java
b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/StartWriteTest.java
index 5dc8de7..5b8d4cd 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/StartWriteTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/StartWriteTest.java
@@ -8,7 +8,7 @@ import org.mockito.ArgumentCaptor;
 
 import org.apache.commons.lang3.reflect.FieldUtils;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.mvcc.entity.CollectionEventBus;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccEntity;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccLogEntry;
@@ -36,7 +36,7 @@ public class StartWriteTest {
     public void testStartStage() throws Exception {
 
 
-        final CollectionContext context = mock( CollectionContext.class );
+        final EntityCollection context = mock( EntityCollection.class );
 
         final CollectionEventBus bus = mock( CollectionEventBus.class );
 
@@ -100,7 +100,7 @@ public class StartWriteTest {
         entity.setVersion( version );
 
 
-        final CollectionContext context = mock( CollectionContext.class );
+        final EntityCollection context = mock( EntityCollection.class );
         final CollectionEventBus eventBus = mock( CollectionEventBus.class );
 
         //mock returning a mock mutation when we do a log entry write
@@ -125,7 +125,7 @@ public class StartWriteTest {
         FieldUtils.writeDeclaredField( entity, "uuid", entityId, true );
 
 
-        final CollectionContext context = mock( CollectionContext.class );
+        final EntityCollection context = mock( EntityCollection.class );
         final CollectionEventBus eventBus = mock( CollectionEventBus.class );
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/UpdateTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/UpdateTest.java
b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/UpdateTest.java
index 910eb38..68d6a27 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/UpdateTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/mvcc/stage/impl/write/UpdateTest.java
@@ -9,7 +9,7 @@ import org.mockito.ArgumentCaptor;
 
 import org.apache.commons.lang3.reflect.FieldUtils;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.mvcc.entity.CollectionEventBus;
 import org.apache.usergrid.persistence.collection.mvcc.stage.ExecutionContext;
 import org.apache.usergrid.persistence.collection.mvcc.stage.Result;
@@ -44,7 +44,7 @@ public class UpdateTest {
         entity.setCreated( createdTime );
 
         final CollectionEventBus eventBus = mock( CollectionEventBus.class );
-        final CollectionContext context = mock( CollectionContext.class );
+        final EntityCollection context = mock( EntityCollection.class );
 
         //mock returning the time
         final TimeService timeService = mock( TimeService.class );
@@ -131,7 +131,7 @@ public class UpdateTest {
 
         final CollectionEventBus eventBus = mock( CollectionEventBus.class );
 
-        final CollectionContext context = mock( CollectionContext.class );
+        final EntityCollection context = mock( EntityCollection.class );
 
 
         //perform the stage

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
index 1c38963..6a6f694 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImplTest.java
@@ -11,9 +11,9 @@ import org.junit.Test;
 
 import org.apache.cassandra.db.marshal.UUIDType;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.guice.CassandraTestCollectionModule;
-import org.apache.usergrid.persistence.collection.impl.CollectionContextImpl;
+import org.apache.usergrid.persistence.collection.impl.EntityCollectionImpl;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccEntity;
 import org.apache.usergrid.persistence.collection.mvcc.entity.impl.MvccEntityImpl;
 import org.apache.usergrid.persistence.collection.serialization.MvccEntitySerializationStrategy;
@@ -61,7 +61,7 @@ public class MvccEntitySerializationStrategyImplTest {
         final UUID applicationId = UUIDGenerator.newTimeUUID();
         final String name = "test";
 
-        CollectionContext context = new CollectionContextImpl( applicationId, applicationId,
name );
+        EntityCollection context = new EntityCollectionImpl( applicationId, name );
 
 
         final UUID entityId = UUIDGenerator.newTimeUUID();
@@ -171,7 +171,7 @@ public class MvccEntitySerializationStrategyImplTest {
         final UUID applicationId = UUIDGenerator.newTimeUUID();
         final String name = "test";
 
-        CollectionContext context = new CollectionContextImpl( applicationId, applicationId,
name );
+        EntityCollection context = new EntityCollectionImpl( applicationId, name );
 
 
         final UUID entityId = UUIDGenerator.newTimeUUID();
@@ -233,7 +233,7 @@ public class MvccEntitySerializationStrategyImplTest {
         final UUID applicationId = UUIDGenerator.newTimeUUID();
         final String name = "test";
 
-        CollectionContext context = new CollectionContextImpl( applicationId, applicationId,
name );
+        EntityCollection context = new EntityCollectionImpl( applicationId, name );
 
 
         final UUID entityId = UUIDGenerator.newTimeUUID();
@@ -351,7 +351,7 @@ public class MvccEntitySerializationStrategyImplTest {
     @Test( expected = NullPointerException.class )
     public void writeParamsEntity() throws ConnectionException {
         serializationStrategy
-                .write( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .write( new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" ),
                         null );
     }
 
@@ -366,7 +366,7 @@ public class MvccEntitySerializationStrategyImplTest {
     public void deleteParamEntityId() throws ConnectionException {
 
         serializationStrategy
-                .delete( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .delete( new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" ),
                         null, UUIDGenerator.newTimeUUID() );
     }
 
@@ -375,7 +375,7 @@ public class MvccEntitySerializationStrategyImplTest {
     public void deleteParamVersion() throws ConnectionException {
 
         serializationStrategy
-                .delete( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .delete( new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" ),
                         UUIDGenerator.newTimeUUID(), null );
     }
 
@@ -390,7 +390,7 @@ public class MvccEntitySerializationStrategyImplTest {
     public void loadParamEntityId() throws ConnectionException {
 
         serializationStrategy
-                .load( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .load( new EntityCollectionImpl(  UUIDGenerator.newTimeUUID(), "test" ),
                         null, UUIDGenerator.newTimeUUID() );
     }
 
@@ -399,7 +399,7 @@ public class MvccEntitySerializationStrategyImplTest {
     public void loadParamVersion() throws ConnectionException {
 
         serializationStrategy
-                .load( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .load( new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" ),
                         UUIDGenerator.newTimeUUID(), null );
     }
 
@@ -414,7 +414,7 @@ public class MvccEntitySerializationStrategyImplTest {
     public void loadListParamEntityId() throws ConnectionException {
 
         serializationStrategy
-                .load( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .load( new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" ),
                         null, UUIDGenerator.newTimeUUID(), 1 );
     }
 
@@ -423,7 +423,7 @@ public class MvccEntitySerializationStrategyImplTest {
     public void loadListParamVersion() throws ConnectionException {
 
         serializationStrategy
-                .load( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .load( new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" ),
                         UUIDGenerator.newTimeUUID(), null, 1 );
     }
 
@@ -432,7 +432,7 @@ public class MvccEntitySerializationStrategyImplTest {
     public void loadListParamSize() throws ConnectionException {
 
         serializationStrategy
-                .load( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .load( new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" ),
                         UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(), 0 );
     }
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccLogEntrySerializationStrategyImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccLogEntrySerializationStrategyImplTest.java
b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccLogEntrySerializationStrategyImplTest.java
index 3261c40..a786138 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccLogEntrySerializationStrategyImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccLogEntrySerializationStrategyImplTest.java
@@ -9,9 +9,9 @@ import java.util.UUID;
 import org.junit.Rule;
 import org.junit.Test;
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 import org.apache.usergrid.persistence.collection.guice.CassandraTestCollectionModule;
-import org.apache.usergrid.persistence.collection.impl.CollectionContextImpl;
+import org.apache.usergrid.persistence.collection.impl.EntityCollectionImpl;
 import org.apache.usergrid.persistence.collection.mvcc.entity.MvccLogEntry;
 import org.apache.usergrid.persistence.collection.mvcc.entity.Stage;
 import org.apache.usergrid.persistence.collection.mvcc.entity.impl.MvccLogEntryImpl;
@@ -58,7 +58,7 @@ public class MvccLogEntrySerializationStrategyImplTest {
         final String name = "test";
 
 
-        CollectionContext context = new CollectionContextImpl( applicationId, applicationId,
name );
+        EntityCollection context = new EntityCollectionImpl( applicationId, name );
 
 
         final UUID uuid = UUIDGenerator.newTimeUUID();
@@ -86,7 +86,7 @@ public class MvccLogEntrySerializationStrategyImplTest {
         final String name = "test";
 
 
-        CollectionContext context = new CollectionContextImpl( applicationId, applicationId,
name );
+        EntityCollection context = new EntityCollectionImpl(  applicationId, name );
 
 
         final UUID uuid = UUIDGenerator.newTimeUUID();
@@ -106,7 +106,7 @@ public class MvccLogEntrySerializationStrategyImplTest {
         final String name = "test";
 
 
-        CollectionContext context = new CollectionContextImpl( applicationId, applicationId,
name );
+        EntityCollection context = new EntityCollectionImpl(  applicationId, name );
 
 
         final UUID uuid = UUIDGenerator.newTimeUUID();
@@ -164,7 +164,7 @@ public class MvccLogEntrySerializationStrategyImplTest {
         final String name = "test";
 
 
-        CollectionContext context = new CollectionContextImpl( applicationId, applicationId,
name );
+        EntityCollection context = new EntityCollectionImpl( applicationId, name );
 
 
         final UUID uuid = UUIDGenerator.newTimeUUID();
@@ -203,7 +203,7 @@ public class MvccLogEntrySerializationStrategyImplTest {
 
     @Test( expected = NullPointerException.class )
     public void writeParams() throws ConnectionException {
-        logEntryStrategy.write( mock( CollectionContext.class ), null );
+        logEntryStrategy.write( mock( EntityCollection.class ), null );
     }
 
 
@@ -217,7 +217,7 @@ public class MvccLogEntrySerializationStrategyImplTest {
     public void deleteParamEntityId() throws ConnectionException {
 
         logEntryStrategy
-                .delete( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .delete( new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" ),
                         null, UUIDGenerator.newTimeUUID() );
     }
 
@@ -226,7 +226,7 @@ public class MvccLogEntrySerializationStrategyImplTest {
     public void deleteParamVersion() throws ConnectionException {
 
         logEntryStrategy
-                .delete( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .delete( new EntityCollectionImpl(  UUIDGenerator.newTimeUUID(), "test" ),
                         UUIDGenerator.newTimeUUID(), null );
     }
 
@@ -241,7 +241,7 @@ public class MvccLogEntrySerializationStrategyImplTest {
     public void loadParamEntityId() throws ConnectionException {
 
         logEntryStrategy
-                .load( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .load( new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" ),
                         null, UUIDGenerator.newTimeUUID() );
     }
 
@@ -250,7 +250,7 @@ public class MvccLogEntrySerializationStrategyImplTest {
     public void loadParamVersion() throws ConnectionException {
 
         logEntryStrategy
-                .load( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .load( new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" ),
                         UUIDGenerator.newTimeUUID(), null );
     }
 
@@ -265,7 +265,7 @@ public class MvccLogEntrySerializationStrategyImplTest {
     public void loadListParamEntityId() throws ConnectionException {
 
         logEntryStrategy
-                .load( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .load( new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" ),
                         null, UUIDGenerator.newTimeUUID(), 1 );
     }
 
@@ -274,7 +274,7 @@ public class MvccLogEntrySerializationStrategyImplTest {
     public void loadListParamVersion() throws ConnectionException {
 
         logEntryStrategy
-                .load( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .load( new EntityCollectionImpl( UUIDGenerator.newTimeUUID(), "test" ),
                         UUIDGenerator.newTimeUUID(), null, 1 );
     }
 
@@ -283,7 +283,7 @@ public class MvccLogEntrySerializationStrategyImplTest {
     public void loadListParamSize() throws ConnectionException {
 
         logEntryStrategy
-                .load( new CollectionContextImpl( UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(),
"test" ),
+                .load( new EntityCollectionImpl(  UUIDGenerator.newTimeUUID(), "test" ),
                         UUIDGenerator.newTimeUUID(), UUIDGenerator.newTimeUUID(), 0 );
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/ce2bfd82/stack/corepersistence/index/src/main/java/org/apache/usergrid/persistence/index/QueryEngineFactory.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/index/src/main/java/org/apache/usergrid/persistence/index/QueryEngineFactory.java
b/stack/corepersistence/index/src/main/java/org/apache/usergrid/persistence/index/QueryEngineFactory.java
index 1358a4e..bb80e3a 100644
--- a/stack/corepersistence/index/src/main/java/org/apache/usergrid/persistence/index/QueryEngineFactory.java
+++ b/stack/corepersistence/index/src/main/java/org/apache/usergrid/persistence/index/QueryEngineFactory.java
@@ -1,7 +1,7 @@
 package org.apache.usergrid.persistence.index;
 
 
-import org.apache.usergrid.persistence.collection.CollectionContext;
+import org.apache.usergrid.persistence.collection.EntityCollection;
 
 
 /**
@@ -17,5 +17,5 @@ public interface QueryEngineFactory
      *
      * @param context The context to use when creating the index manager
      */
-    public QueryEngineFactory createIndexManager( CollectionContext context );
+    public QueryEngineFactory createIndexManager( EntityCollection context );
 }


Mime
View raw message