5454import com .arangodb .entity .BaseDocument ;
5555import com .arangodb .entity .BaseEdgeDocument ;
5656import com .arangodb .entity .CollectionEntity ;
57+ import com .arangodb .entity .CollectionPropertiesEntity ;
5758import com .arangodb .entity .CollectionType ;
5859import com .arangodb .entity .DatabaseEntity ;
5960import com .arangodb .entity .GraphEntity ;
@@ -161,8 +162,9 @@ public void createCollectionWithNumberOfShardsAndShardKey() {
161162 new CollectionCreateOptions ().numberOfShards (2 ).shardKeys ("a" ));
162163 assertThat (result , is (notNullValue ()));
163164 assertThat (result .getId (), is (notNullValue ()));
164- assertThat (db .collection (COLLECTION_NAME ).getProperties ().getNumberOfShards (), is (2 ));
165- assertThat (db .collection (COLLECTION_NAME ).getProperties ().getShardKeys ().size (), is (1 ));
165+ final CollectionPropertiesEntity properties = db .collection (COLLECTION_NAME ).getProperties ();
166+ assertThat (properties .getNumberOfShards (), is (2 ));
167+ assertThat (properties .getShardKeys ().size (), is (1 ));
166168 } finally {
167169 db .collection (COLLECTION_NAME ).drop ();
168170 }
@@ -178,8 +180,9 @@ public void createCollectionWithNumberOfShardsAndShardKeys() {
178180 new CollectionCreateOptions ().numberOfShards (2 ).shardKeys ("a" , "b" ));
179181 assertThat (result , is (notNullValue ()));
180182 assertThat (result .getId (), is (notNullValue ()));
181- assertThat (db .collection (COLLECTION_NAME ).getProperties ().getNumberOfShards (), is (2 ));
182- assertThat (db .collection (COLLECTION_NAME ).getProperties ().getShardKeys ().size (), is (2 ));
183+ final CollectionPropertiesEntity properties = db .collection (COLLECTION_NAME ).getProperties ();
184+ assertThat (properties .getNumberOfShards (), is (2 ));
185+ assertThat (properties .getShardKeys ().size (), is (2 ));
183186 } finally {
184187 db .collection (COLLECTION_NAME ).drop ();
185188 }
0 commit comments