51
51
import com .arangodb .entity .BaseDocument ;
52
52
import com .arangodb .entity .BaseEdgeDocument ;
53
53
import com .arangodb .entity .CollectionEntity ;
54
+ import com .arangodb .entity .CollectionPropertiesEntity ;
54
55
import com .arangodb .entity .CollectionType ;
55
56
import com .arangodb .entity .DatabaseEntity ;
56
57
import com .arangodb .entity .GraphEntity ;
@@ -153,8 +154,9 @@ public void createCollectionWithNumberOfShardsAndShardKey() {
153
154
new CollectionCreateOptions ().numberOfShards (2 ).shardKeys ("a" ));
154
155
assertThat (result , is (notNullValue ()));
155
156
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 ));
158
160
} finally {
159
161
db .collection (COLLECTION_NAME ).drop ();
160
162
}
@@ -170,8 +172,9 @@ public void createCollectionWithNumberOfShardsAndShardKeys() {
170
172
new CollectionCreateOptions ().numberOfShards (2 ).shardKeys ("a" , "b" ));
171
173
assertThat (result , is (notNullValue ()));
172
174
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 ));
175
178
} finally {
176
179
db .collection (COLLECTION_NAME ).drop ();
177
180
}
0 commit comments