@@ -108,7 +108,7 @@ public void createsCollectionWithEncryptedFieldsCorrectly(CollectionOptions coll
108
108
.containsEntry ("queries" , List .of (Document .parse (
109
109
"{'queryType': 'range', 'contention': { '$numberLong' : '0' }, 'min': { '$numberLong' : '-1' }, 'max': { '$numberLong' : '1' }}" )));
110
110
111
- assertThat (fields .get (2 )).containsEntry ("path" , "encryptedDouble" ) //
111
+ assertThat (fields .get (3 )).containsEntry ("path" , "encryptedDouble" ) //
112
112
.containsEntry ("bsonType" , "double" ) //
113
113
.containsEntry ("queries" , List .of (Document .parse (
114
114
"{'queryType': 'range', 'contention': { '$numberLong' : '1' }, 'min': { '$numberDouble' : '-1.123' }, 'max': { '$numberDouble' : '1.123' }, 'precision': { '$numberInt' : '5'}}" )));
@@ -119,13 +119,14 @@ private static Stream<Arguments> collectionOptions() {
119
119
BsonBinary key1 = new BsonBinary (UUID .randomUUID (), UuidRepresentation .STANDARD );
120
120
BsonBinary key2 = new BsonBinary (UUID .randomUUID (), UuidRepresentation .STANDARD );
121
121
BsonBinary key3 = new BsonBinary (UUID .randomUUID (), UuidRepresentation .STANDARD );
122
+ BsonBinary key4 = new BsonBinary (UUID .randomUUID (), UuidRepresentation .STANDARD );
122
123
123
124
CollectionOptions manualOptions = CollectionOptions .encryptedCollection (options -> options //
124
125
.encrypted (int32 ("encrypted-but-not-queryable" ), key1 ) //
125
126
.queryable (encrypted (int32 ("encryptedInt" )).keyId (key2 ), range ().min (5 ).max (100 ).contention (1 )) //
126
127
.queryable (encrypted (JsonSchemaProperty .int64 ("nested.encryptedLong" )).keyId (key3 ),
127
128
range ().min (-1L ).max (1L ).contention (0 )) //
128
- .queryable (encrypted (JsonSchemaProperty .float64 ("encryptedDouble" )).keys (key3 ),
129
+ .queryable (encrypted (JsonSchemaProperty .float64 ("encryptedDouble" )).keys (key4 ),
129
130
range ().min (-1.123D ).max (1.123D ).precision (5 ).contention (1 )));
130
131
131
132
CollectionOptions schemaOptions = CollectionOptions .encryptedCollection (MongoJsonSchema .builder () //
@@ -134,7 +135,7 @@ private static Stream<Arguments> collectionOptions() {
134
135
queryable (encrypted (int32 ("encryptedInt" )).keyId (key2 ), List .of (range ().min (5 ).max (100 ).contention (1 ))))
135
136
.property (queryable (encrypted (int64 ("nested.encryptedLong" )).keyId (key3 ),
136
137
List .of (range ().min (-1L ).max (1L ).contention (0 ))))
137
- .property (queryable (encrypted (float64 ("encryptedDouble" )).keyId (key3 ),
138
+ .property (queryable (encrypted (float64 ("encryptedDouble" )).keyId (key4 ),
138
139
List .of (range ().min (-1.123D ).max (1.123D ).precision (5 ).contention (1 ))))
139
140
.build ());
140
141
0 commit comments