@@ -115,7 +115,7 @@ public void testBuildWithValidPollingInterval() {
115
115
OptimizelyManager manager = OptimizelyManager .builder ()
116
116
.withSDKKey (testSdkKey )
117
117
.withDatafileDownloadInterval (interval , timeUnit )
118
- .withVuid ( "any-to-avoid-generate" )
118
+ .withVuidEnabled ( )
119
119
.build (mockContext );
120
120
121
121
assertEquals (interval * 60L , manager .getDatafileDownloadInterval ().longValue ());
@@ -128,7 +128,7 @@ public void testBuildWithEventHandler() {
128
128
.withSDKKey (testSdkKey )
129
129
.withDatafileDownloadInterval (901L , TimeUnit .SECONDS )
130
130
.withEventHandler (eventHandler )
131
- .withVuid ( "any-to-avoid-generate" )
131
+ .withVuidEnabled ( )
132
132
.build (mockContext );
133
133
134
134
assertEquals (901L , manager .getDatafileDownloadInterval ().longValue ());
@@ -142,7 +142,7 @@ public void testBuildWithErrorHandler() {
142
142
.withSDKKey (testSdkKey )
143
143
.withDatafileDownloadInterval (61L , TimeUnit .SECONDS )
144
144
.withErrorHandler (errorHandler )
145
- .withVuid ( "any-to-avoid-generate" )
145
+ .withVuidEnabled ( )
146
146
.build (mockContext );
147
147
148
148
manager .initialize (mockContext , minDatafile );
@@ -157,7 +157,7 @@ public void testBuildWithDatafileHandler() {
157
157
.withSDKKey (testSdkKey )
158
158
.withDatafileDownloadInterval (61L , TimeUnit .SECONDS )
159
159
.withDatafileHandler (dfHandler )
160
- .withVuid ( "any-to-avoid-generate" )
160
+ .withVuidEnabled ( )
161
161
.build (mockContext );
162
162
163
163
manager .initialize (mockContext , minDatafile );
@@ -172,7 +172,7 @@ public void testBuildWithUserProfileService() {
172
172
.withSDKKey (testSdkKey )
173
173
.withDatafileDownloadInterval (61L , TimeUnit .SECONDS )
174
174
.withUserProfileService (ups )
175
- .withVuid ( "any-to-avoid-generate" )
175
+ .withVuidEnabled ( )
176
176
.build (mockContext );
177
177
178
178
manager .initialize (mockContext , minDatafile );
@@ -189,7 +189,7 @@ public void testBuildWithDatafileDownloadInterval_workerScheduled() throws Excep
189
189
.withSDKKey (testSdkKey )
190
190
.withDatafileHandler (mockDatafileHandler )
191
191
.withDatafileDownloadInterval (goodNumber , TimeUnit .MINUTES )
192
- .withVuid ( "any-to-avoid-generate" )
192
+ .withVuidEnabled ( )
193
193
.build (mockContext );
194
194
OptimizelyManager spyManager = spy (manager );
195
195
when (spyManager .isAndroidVersionSupported ()).thenReturn (true );
@@ -205,7 +205,7 @@ public void testBuildWithDatafileDownloadInterval_workerCancelledWhenIntervalIsN
205
205
.withSDKKey (testSdkKey )
206
206
.withDatafileHandler (mockDatafileHandler )
207
207
.withDatafileDownloadInterval (-1 , TimeUnit .MINUTES )
208
- .withVuid ( "any-to-avoid-generate" )
208
+ .withVuidEnabled ( )
209
209
.build (mockContext );
210
210
OptimizelyManager spyManager = spy (manager );
211
211
when (spyManager .isAndroidVersionSupported ()).thenReturn (true );
@@ -220,7 +220,7 @@ public void testBuildWithCustomSdkNameAndVersion() throws Exception {
220
220
OptimizelyManager manager = OptimizelyManager .builder ()
221
221
.withSDKKey (testSdkKey )
222
222
.withClientInfo ("test-sdk" , "test-version" )
223
- .withVuid ( "any-to-avoid-generate" )
223
+ .withVuidEnabled ( )
224
224
.build (mockContext );
225
225
assertEquals (manager .getSdkName (mockContext ), "test-sdk" );
226
226
assertEquals (manager .getSdkVersion (), "test-version" );
@@ -232,7 +232,7 @@ public void testBuildWithDefaultODP_defaultEnabled() throws Exception {
232
232
233
233
OptimizelyManager manager = OptimizelyManager .builder ()
234
234
.withSDKKey (testSdkKey )
235
- .withVuid ( "test-vuid" )
235
+ .withVuidEnabled ( )
236
236
.build (mockContext );
237
237
238
238
verifyNew (OptimizelyManager .class ).withArguments (
@@ -262,7 +262,7 @@ public void testBuildWithDefaultODP_disabled() throws Exception {
262
262
OptimizelyManager manager = OptimizelyManager .builder ()
263
263
.withSDKKey (testSdkKey )
264
264
.withODPDisabled ()
265
- .withVuid ( "test-vuid" )
265
+ .withVuidEnabled ( )
266
266
.build (mockContext );
267
267
268
268
verifyNew (OptimizelyManager .class ).withArguments (
@@ -293,7 +293,7 @@ public void testBuildWithODP_defaultCacheSizeAndTimeout() throws Exception {
293
293
294
294
OptimizelyManager manager = OptimizelyManager .builder ()
295
295
.withSDKKey (testSdkKey )
296
- .withVuid ( "any-to-avoid-generate" )
296
+ .withVuidEnabled ( )
297
297
.build (mockContext );
298
298
299
299
verifyNew (ODPManager .class ).withArguments (
@@ -320,7 +320,7 @@ public void testBuildWithODP_customSegmentCacheSize() throws Exception {
320
320
OptimizelyManager manager = OptimizelyManager .builder ()
321
321
.withSDKKey (testSdkKey )
322
322
.withODPSegmentCacheSize (1234 )
323
- .withVuid ( "any-to-avoid-generate" )
323
+ .withVuidEnabled ( )
324
324
.build (mockContext );
325
325
326
326
verifyNew (ODPSegmentManager .class ).withArguments (
@@ -337,7 +337,7 @@ public void testBuildWithODP_customSegmentCacheTimeout() throws Exception {
337
337
OptimizelyManager manager = OptimizelyManager .builder ()
338
338
.withSDKKey (testSdkKey )
339
339
.withODPSegmentCacheTimeout (20 , TimeUnit .MINUTES )
340
- .withVuid ( "any-to-avoid-generate" )
340
+ .withVuidEnabled ( )
341
341
.build (mockContext );
342
342
343
343
verifyNew (ODPSegmentManager .class ).withArguments (
@@ -351,7 +351,7 @@ public void testBuildWithODP_customSegmentCacheTimeout() throws Exception {
351
351
public void testBuildWithODP_defaultSegmentFetchTimeout () throws Exception {
352
352
OptimizelyManager manager = OptimizelyManager .builder ()
353
353
.withSDKKey (testSdkKey )
354
- .withVuid ( "any-to-avoid-generate" )
354
+ .withVuidEnabled ( )
355
355
.build (mockContext );
356
356
357
357
assertEquals (ODPSegmentClient .Companion .getCONNECTION_TIMEOUT (), 10 *1000 );
@@ -364,7 +364,7 @@ public void testBuildWithODP_customSegmentFetchTimeout() throws Exception {
364
364
.withSDKKey (testSdkKey )
365
365
.withTimeoutForODPSegmentFetch (20 )
366
366
.withTimeoutForODPEventDispatch (30 )
367
- .withVuid ( "any-to-avoid-generate" )
367
+ .withVuidEnabled ( )
368
368
.build (mockContext );
369
369
370
370
assertEquals (ODPSegmentClient .Companion .getCONNECTION_TIMEOUT (), 20 *1000 );
@@ -380,7 +380,7 @@ public void testBuildWithODP_defaultCommonDataAndIdentifiers() throws Exception
380
380
381
381
OptimizelyManager manager = OptimizelyManager .builder ()
382
382
.withSDKKey (testSdkKey )
383
- .withVuid ( "test-vuid" )
383
+ .withVuidEnabled ( )
384
384
.build (mockContext );
385
385
386
386
ArgumentCaptor <Map <String , Object >> captorData = ArgumentCaptor .forClass (Map .class );
0 commit comments