You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@usergrid.apache.org by sf...@apache.org on 2014/11/21 22:35:48 UTC

[10/19] incubator-usergrid git commit: Renamed entity log load methods to be more clear. Also updated documentation.

Renamed entity log load methods to be more clear.  Also updated documentation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/commit/262ad8ba
Tree: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/tree/262ad8ba
Diff: http://git-wip-us.apache.org/repos/asf/incubator-usergrid/diff/262ad8ba

Branch: refs/heads/two-dot-o
Commit: 262ad8ba3a0ab9e743b6b0013725f1079d014d52
Parents: eb91d13
Author: Todd Nine <tn...@apigee.com>
Authored: Thu Nov 20 10:08:53 2014 -0700
Committer: Todd Nine <tn...@apigee.com>
Committed: Thu Nov 20 10:08:53 2014 -0700

----------------------------------------------------------------------
 .../corepersistence/CpEntityDeleteListener.java |  6 ++---
 .../CpEntityDeleteListenerTest.java             |  4 ++--
 .../mvcc/MvccEntitySerializationStrategy.java   | 18 +++++++-------
 .../mvcc/stage/delete/MarkCommit.java           |  2 +-
 .../serialization/impl/EntityRepairImpl.java    |  2 +-
 .../MvccEntitySerializationStrategyImpl.java    | 23 +++++++-----------
 ...vccEntitySerializationStrategyProxyImpl.java | 16 ++++++-------
 .../serialization/EntityRepairImplTest.java     |  2 +-
 ...ccEntitySerializationSTrategyV2FixTests.java |  2 +-
 ...MvccEntitySerializationStrategyImplTest.java | 25 ++++++++++++--------
 10 files changed, 50 insertions(+), 50 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/262ad8ba/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityDeleteListener.java
----------------------------------------------------------------------
diff --git a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityDeleteListener.java b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityDeleteListener.java
index 8785ab2..e75756f 100644
--- a/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityDeleteListener.java
+++ b/stack/core/src/main/java/org/apache/usergrid/corepersistence/CpEntityDeleteListener.java
@@ -69,10 +69,8 @@ public class CpEntityDeleteListener {
         return Observable.create( new ObservableIterator<MvccEntity>( "deleteEntities" ) {
             @Override
             protected Iterator<MvccEntity> getIterator() {
-                Iterator<MvccEntity> iterator = entityMetadataSerialization.loadHistory( 
-                        entityEvent.getCollectionScope(), 
-                        entity.getId(), 
-                        entity.getVersion(), 
+                Iterator<MvccEntity> iterator = entityMetadataSerialization.loadAscendingHistory(
+                        entityEvent.getCollectionScope(), entity.getId(), entity.getVersion(),
                         serializationFig.getHistorySize() );
                 return iterator;
             }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/262ad8ba/stack/core/src/test/java/org/apache/usergrid/corepersistence/CpEntityDeleteListenerTest.java
----------------------------------------------------------------------
diff --git a/stack/core/src/test/java/org/apache/usergrid/corepersistence/CpEntityDeleteListenerTest.java b/stack/core/src/test/java/org/apache/usergrid/corepersistence/CpEntityDeleteListenerTest.java
index 6efab38..2147c45 100644
--- a/stack/core/src/test/java/org/apache/usergrid/corepersistence/CpEntityDeleteListenerTest.java
+++ b/stack/core/src/test/java/org/apache/usergrid/corepersistence/CpEntityDeleteListenerTest.java
@@ -23,7 +23,6 @@ import java.util.UUID;
 
 import org.junit.Before;
 import org.junit.Test;
-import org.junit.runner.RunWith;
 
 import org.apache.usergrid.persistence.collection.CollectionScope;
 import org.apache.usergrid.persistence.collection.mvcc.MvccEntitySerializationStrategy;
@@ -81,7 +80,8 @@ public class CpEntityDeleteListenerTest {
         ArrayList<MvccEntity> entityList = new ArrayList<>();
         entityList.add(entity);
         when(mvccEntitySerializationStrategy.delete(scope, entityId, id)).thenReturn(batch);
-        when(mvccEntitySerializationStrategy.loadHistory(scope, entityId, id, serializationFig.getHistorySize())).thenReturn(entityList.iterator());
+        when(mvccEntitySerializationStrategy.loadAscendingHistory( scope, entityId, id,
+                serializationFig.getHistorySize() )).thenReturn(entityList.iterator());
 
         Observable<EntityVersion> observable = listener.receive(entityEvent);
         EntityVersion entityEventReturned = observable.toBlocking().last();

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/262ad8ba/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/MvccEntitySerializationStrategy.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/MvccEntitySerializationStrategy.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/MvccEntitySerializationStrategy.java
index 3c694c5..8a13115 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/MvccEntitySerializationStrategy.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/MvccEntitySerializationStrategy.java
@@ -62,24 +62,26 @@ public interface MvccEntitySerializationStrategy extends Migration {
      * @param context The context to persist the entity into
      * @param entityId The entity id to load
      * @param version The max version to seek from.  I.E a stored version <= this argument
-     * @param fetchSize The maximum size to return.  If you receive this size, there may be more versions to load.
+     * @param fetchSize The fetch size to return for each trip to cassandra.
      *
-     * @return A list of entities up to max size ordered from max(UUID)=> min(UUID).  The return value should be null
+     * @return An iterator of entities ordered from max(UUID)=> min(UUID).  The return value should be null
      *         safe and return an empty list when there are no matches
      */
-    public Iterator<MvccEntity> load( CollectionScope context, Id entityId, UUID version, int fetchSize );
+    public Iterator<MvccEntity> loadDescendingHistory( CollectionScope context, Id entityId, UUID version,
+                                                       int fetchSize );
 
     /**
-     * Load a historical list of entities, from highest to lowest of the entity with versions < version up to maxSize elements
+     * Load a historical list of entities, from lowest to highest entity with versions < version up to maxSize elements
      *
      * @param context The context to persist the entity into
      * @param entityId The entity id to load
-     * @param version The max version to seek from.  I.E a stored version < this argument
-     * @param fetchSize The maximum size to return.  If you receive this size, there may be more versions to load.
-     * @return A list of entities up to max size ordered from max(UUID)=> min(UUID).  The return value should be null
+     * @param version The max version to seek to.  I.E a stored version < this argument
+     * @param fetchSize The fetch size to return for each trip to cassandra.
+     * @return An iterator of entities ordered from min(UUID)=> max(UUID).  The return value should be null
      *         safe and return an empty list when there are no matches
      */
-    public Iterator<MvccEntity> loadHistory( CollectionScope context, Id entityId, UUID version, int fetchSize );
+    public Iterator<MvccEntity> loadAscendingHistory( CollectionScope context, Id entityId, UUID version,
+                                                      int fetchSize );
 
     /**
      * Mark this  this version as deleted from the persistence store, but keep the version to mark that is has been cleared This

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/262ad8ba/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/MarkCommit.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/MarkCommit.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/MarkCommit.java
index 5bcb9f8..e31aba5 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/MarkCommit.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/mvcc/stage/delete/MarkCommit.java
@@ -129,7 +129,7 @@ public class MarkCommit implements Action1<CollectionIoEvent<MvccEntity>> {
                     @Override
                     protected Iterator<MvccEntity> getIterator() {
                         Iterator<MvccEntity> entities =
-                                entityStrat.load( collectionScope, entityId, entity.getVersion(), 100 );
+                                entityStrat.loadDescendingHistory( collectionScope, entityId, entity.getVersion(), 100 );
 
                         return entities;
                     }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/262ad8ba/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/EntityRepairImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/EntityRepairImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/EntityRepairImpl.java
index a94c688..4226fe6 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/EntityRepairImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/EntityRepairImpl.java
@@ -69,7 +69,7 @@ public class EntityRepairImpl implements EntityRepair {
         partialEntities.add( targetEntity );
 
         final Iterator<MvccEntity> results = mvccEntitySerializationStrategy
-                .load( collectionScope, targetEntity.getId(), targetEntity.getVersion(),
+                .loadDescendingHistory( collectionScope, targetEntity.getId(), targetEntity.getVersion(),
                         serializationFig.getBufferSize() );
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/262ad8ba/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java
index 1ec027f..4138f8d 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyImpl.java
@@ -48,7 +48,6 @@ import org.apache.usergrid.persistence.core.astyanax.IdRowCompositeSerializer;
 import org.apache.usergrid.persistence.core.astyanax.MultiTennantColumnFamily;
 import org.apache.usergrid.persistence.core.astyanax.MultiTennantColumnFamilyDefinition;
 import org.apache.usergrid.persistence.core.astyanax.ScopedRowKey;
-import org.apache.usergrid.persistence.core.migration.schema.Migration;
 import org.apache.usergrid.persistence.model.entity.Entity;
 import org.apache.usergrid.persistence.model.entity.Id;
 
@@ -64,8 +63,6 @@ import com.netflix.astyanax.model.ColumnList;
 import com.netflix.astyanax.model.Row;
 import com.netflix.astyanax.query.RowQuery;
 import com.netflix.astyanax.serializers.AbstractSerializer;
-import com.netflix.astyanax.serializers.ByteBufferSerializer;
-import com.netflix.astyanax.serializers.BytesArraySerializer;
 import com.netflix.astyanax.serializers.UUIDSerializer;
 
 
@@ -77,7 +74,6 @@ public abstract class MvccEntitySerializationStrategyImpl implements MvccEntityS
     private static final Logger log = LoggerFactory.getLogger( MvccLogEntrySerializationStrategyImpl.class );
 
 
-
     private static final IdRowCompositeSerializer ID_SER = IdRowCompositeSerializer.get();
 
 
@@ -196,7 +192,8 @@ public abstract class MvccEntitySerializationStrategyImpl implements MvccEntityS
 
             final Column<UUID> column = columns.getColumnByIndex( 0 );
 
-            final MvccEntity parsedEntity = new MvccColumnParser( entityId, entityJsonSerializer ).parseColumn( column );
+            final MvccEntity parsedEntity =
+                    new MvccColumnParser( entityId, entityJsonSerializer ).parseColumn( column );
 
             //we *might* need to repair, it's not clear so check before loading into result sets
             final MvccEntity maybeRepaired = repair.maybeRepair( collectionScope, parsedEntity );
@@ -209,8 +206,8 @@ public abstract class MvccEntitySerializationStrategyImpl implements MvccEntityS
 
 
     @Override
-    public Iterator<MvccEntity> load( final CollectionScope collectionScope, final Id entityId, final UUID version,
-                                      final int fetchSize ) {
+    public Iterator<MvccEntity> loadDescendingHistory( final CollectionScope collectionScope, final Id entityId,
+                                                       final UUID version, final int fetchSize ) {
 
         Preconditions.checkNotNull( collectionScope, "collectionScope is required" );
         Preconditions.checkNotNull( entityId, "entity id is required" );
@@ -239,8 +236,8 @@ public abstract class MvccEntitySerializationStrategyImpl implements MvccEntityS
 
 
     @Override
-    public Iterator<MvccEntity> loadHistory( final CollectionScope collectionScope, final Id entityId,
-                                             final UUID version, final int fetchSize ) {
+    public Iterator<MvccEntity> loadAscendingHistory( final CollectionScope collectionScope, final Id entityId,
+                                                      final UUID version, final int fetchSize ) {
 
         Preconditions.checkNotNull( collectionScope, "collectionScope is required" );
         Preconditions.checkNotNull( entityId, "entity id is required" );
@@ -393,10 +390,9 @@ public abstract class MvccEntitySerializationStrategyImpl implements MvccEntityS
                 deSerialized = column.getValue( entityJsonSerializer );
             }
             catch ( DataCorruptionException e ) {
-              log.error(
-                      "DATA CORRUPTION DETECTED when de-serializing entity with Id {} and version {}.  This means the"
-                              + " write was truncated.",
-                      id, version );
+                log.error(
+                        "DATA CORRUPTION DETECTED when de-serializing entity with Id {} and version {}.  This means the"
+                                + " write was truncated.", id, version );
                 //return an empty entity, we can never load this one, and we don't want it to bring the system
                 //to a grinding halt
                 return new MvccEntityImpl( id, version, MvccEntity.Status.DELETED, Optional.<Entity>absent() );
@@ -414,7 +410,6 @@ public abstract class MvccEntitySerializationStrategyImpl implements MvccEntityS
 
     /**
      * Return the entity serializer for this instance
-     * @return
      */
     protected abstract AbstractSerializer<EntityWrapper> getEntitySerializer();
 }

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/262ad8ba/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyProxyImpl.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyProxyImpl.java b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyProxyImpl.java
index a9e01b1..cf17812 100644
--- a/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyProxyImpl.java
+++ b/stack/corepersistence/collection/src/main/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationStrategyProxyImpl.java
@@ -96,24 +96,24 @@ public class MvccEntitySerializationStrategyProxyImpl implements MvccEntitySeria
 
 
     @Override
-    public Iterator<MvccEntity> load( final CollectionScope context, final Id entityId, final UUID version,
-                                      final int fetchSize ) {
+    public Iterator<MvccEntity> loadDescendingHistory( final CollectionScope context, final Id entityId,
+                                                       final UUID version, final int fetchSize ) {
         if ( isOldVersion() ) {
-            return previous.load( context, entityId, version, fetchSize );
+            return previous.loadDescendingHistory( context, entityId, version, fetchSize );
         }
 
-        return current.load( context, entityId, version, fetchSize );
+        return current.loadDescendingHistory( context, entityId, version, fetchSize );
     }
 
 
     @Override
-    public Iterator<MvccEntity> loadHistory( final CollectionScope context, final Id entityId, final UUID version,
-                                             final int fetchSize ) {
+    public Iterator<MvccEntity> loadAscendingHistory( final CollectionScope context, final Id entityId,
+                                                      final UUID version, final int fetchSize ) {
         if ( isOldVersion() ) {
-            return previous.loadHistory( context, entityId, version, fetchSize );
+            return previous.loadAscendingHistory( context, entityId, version, fetchSize );
         }
 
-        return current.loadHistory( context, entityId, version, fetchSize );
+        return current.loadAscendingHistory( context, entityId, version, fetchSize );
     }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/262ad8ba/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/EntityRepairImplTest.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/EntityRepairImplTest.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/EntityRepairImplTest.java
index 4326e10..6194c80 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/EntityRepairImplTest.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/EntityRepairImplTest.java
@@ -101,7 +101,7 @@ public class EntityRepairImplTest {
 
         //mock up returning
         when( mvccEntitySerializationStrategy
-                .loadHistory( scope, simpleId, v3.getVersion(), serializationFig.getBufferSize() ) )
+                .loadDescendingHistory( scope, simpleId, v3.getVersion(), serializationFig.getBufferSize() ) )
                 .thenReturn( Arrays.<MvccEntity>asList( v3, v2, v1 ).iterator() );
 
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/262ad8ba/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationSTrategyV2FixTests.java
----------------------------------------------------------------------
diff --git a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationSTrategyV2FixTests.java b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationSTrategyV2FixTests.java
index 293922e..0d7e335 100644
--- a/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationSTrategyV2FixTests.java
+++ b/stack/corepersistence/collection/src/test/java/org/apache/usergrid/persistence/collection/serialization/impl/MvccEntitySerializationSTrategyV2FixTests.java
@@ -69,7 +69,7 @@ public abstract class MvccEntitySerializationSTrategyV2FixTests extends MvccEnti
 
         //now load it
         final Iterator<MvccEntity> loaded =
-                getMvccEntitySerializationStrategy().loadHistory( context, entity.getId(), version, 100 );
+                getMvccEntitySerializationStrategy().loadAscendingHistory( context, entity.getId(), version, 100 );
 
         assertTrue( loaded.hasNext() );
 

http://git-wip-us.apache.org/repos/asf/incubator-usergrid/blob/262ad8ba/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 4b5ea7a..d54d958 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
@@ -402,7 +402,7 @@ public abstract class MvccEntitySerializationStrategyImplTest {
         //now ask for up to 10 versions from the current version, we should get cleared, v2, v1
         UUID current = UUIDGenerator.newTimeUUID();
 
-        Iterator<MvccEntity> entities = serializationStrategy.load( context, id, current, 3 );
+        Iterator<MvccEntity> entities = serializationStrategy.loadDescendingHistory( context, id, current, 3 );
 
         MvccEntity first = entities.next();
         assertEquals( clearedV3, first);
@@ -422,7 +422,7 @@ public abstract class MvccEntitySerializationStrategyImplTest {
         serializationStrategy.delete( context, id , version1 ).execute();
         serializationStrategy.delete( context, id , version2 ).execute();
 
-        entities = serializationStrategy.load( context, id, current, 3 );
+        entities = serializationStrategy.loadDescendingHistory( context, id, current, 3 );
 
          first = entities.next();
         assertEquals( clearedV3, first );
@@ -432,7 +432,7 @@ public abstract class MvccEntitySerializationStrategyImplTest {
         serializationStrategy.delete( context,  id , version3 ).execute();
 
 
-        entities = serializationStrategy.load( context, id, current, 3 );
+        entities = serializationStrategy.loadDescendingHistory( context, id, current, 3 );
 
         Assert.assertTrue( !entities.hasNext());
     }
@@ -464,7 +464,8 @@ public abstract class MvccEntitySerializationStrategyImplTest {
         MvccEntity savedV2 = new MvccEntityImpl(id, version2, MvccEntity.Status.COMPLETE, Optional.of(entityv2));
         serializationStrategy.write(context, savedV2).execute();
 
-        Iterator<MvccEntity> entities = serializationStrategy.loadHistory(context,id,savedV2.getVersion(),20);
+        Iterator<MvccEntity> entities = serializationStrategy.loadAscendingHistory( context, id, savedV2.getVersion(),
+                20 );
         assertTrue(entities.hasNext());
         assertEquals(saved.getVersion(), entities.next().getVersion());
         assertEquals(savedV2.getVersion(), entities.next().getVersion());
@@ -639,7 +640,7 @@ public abstract class MvccEntitySerializationStrategyImplTest {
 
     @Test(expected = NullPointerException.class)
     public void loadListParamContext() throws ConnectionException {
-        serializationStrategy.load( null, new SimpleId( "test" ), UUIDGenerator.newTimeUUID(), 1 );
+        serializationStrategy.loadDescendingHistory( null, new SimpleId( "test" ), UUIDGenerator.newTimeUUID(), 1 );
     }
 
 
@@ -647,8 +648,9 @@ public abstract class MvccEntitySerializationStrategyImplTest {
     public void loadListParamEntityId() throws ConnectionException {
 
         serializationStrategy
-                .load( new CollectionScopeImpl(new SimpleId( "organization" ), new SimpleId( "test" ), "test" ), null, UUIDGenerator.newTimeUUID(),
-                        1 );
+                .loadDescendingHistory(
+                        new CollectionScopeImpl( new SimpleId( "organization" ), new SimpleId( "test" ), "test" ), null,
+                        UUIDGenerator.newTimeUUID(), 1 );
     }
 
 
@@ -656,15 +658,18 @@ public abstract class MvccEntitySerializationStrategyImplTest {
     public void loadListParamVersion() throws ConnectionException {
 
         serializationStrategy
-                .load( new CollectionScopeImpl(new SimpleId( "organization" ), new SimpleId( "test" ), "test" ), new SimpleId( "test" ), null, 1 );
+                .loadDescendingHistory(
+                        new CollectionScopeImpl( new SimpleId( "organization" ), new SimpleId( "test" ), "test" ),
+                        new SimpleId( "test" ), null, 1 );
     }
 
 
     @Test(expected = IllegalArgumentException.class)
     public void loadListParamSize() throws ConnectionException {
 
-        serializationStrategy.load( new CollectionScopeImpl(new SimpleId( "organization" ), new SimpleId( "test" ), "test" ), new SimpleId( "test" ),
-                UUIDGenerator.newTimeUUID(), 0 );
+        serializationStrategy.loadDescendingHistory(
+                new CollectionScopeImpl( new SimpleId( "organization" ), new SimpleId( "test" ), "test" ),
+                new SimpleId( "test" ), UUIDGenerator.newTimeUUID(), 0 );
     }