5151import com .arangodb .entity .BaseDocument ;
5252import com .arangodb .entity .BaseEdgeDocument ;
5353import com .arangodb .entity .CollectionEntity ;
54+ import com .arangodb .entity .CollectionPropertiesEntity ;
5455import com .arangodb .entity .CollectionType ;
5556import com .arangodb .entity .DatabaseEntity ;
5657import com .arangodb .entity .GraphEntity ;
@@ -153,8 +154,9 @@ public void createCollectionWithNumberOfShardsAndShardKey() {
153154 new CollectionCreateOptions ().numberOfShards (2 ).shardKeys ("a" ));
154155 assertThat (result , is (notNullValue ()));
155156 assertThat (result .getId (), is (notNullValue ()));
156- assertThat (db .collection (COLLECTION_NAME ).getProperties ().getNumberOfShards (), is (2 ));
157- assertThat (db .collection (COLLECTION_NAME ).getProperties ().getShardKeys ().size (), is (1 ));
157+ final CollectionPropertiesEntity properties = db .collection (COLLECTION_NAME ).getProperties ();
158+ assertThat (properties .getNumberOfShards (), is (2 ));
159+ assertThat (properties .getShardKeys ().size (), is (1 ));
158160 } finally {
159161 db .collection (COLLECTION_NAME ).drop ();
160162 }
@@ -170,8 +172,9 @@ public void createCollectionWithNumberOfShardsAndShardKeys() {
170172 new CollectionCreateOptions ().numberOfShards (2 ).shardKeys ("a" , "b" ));
171173 assertThat (result , is (notNullValue ()));
172174 assertThat (result .getId (), is (notNullValue ()));
173- assertThat (db .collection (COLLECTION_NAME ).getProperties ().getNumberOfShards (), is (2 ));
174- assertThat (db .collection (COLLECTION_NAME ).getProperties ().getShardKeys ().size (), is (2 ));
175+ final CollectionPropertiesEntity properties = db .collection (COLLECTION_NAME ).getProperties ();
176+ assertThat (properties .getNumberOfShards (), is (2 ));
177+ assertThat (properties .getShardKeys ().size (), is (2 ));
175178 } finally {
176179 db .collection (COLLECTION_NAME ).drop ();
177180 }
0 commit comments