@@ -449,10 +449,10 @@ public void bucketUserNotInOverlappingGroupExperiment() throws Exception {
449449 * Verify that {@link Bucketer#bucket(Experiment,String)} saves a variation of an experiment for a user
450450 * when a {@link UserProfile} is present.
451451 */
452- @ Test public void bucketUserSaveActivationWithUserExperimentRecord () throws Exception {
452+ @ Test public void bucketUserSaveActivationWithUserProfile () throws Exception {
453453 final AtomicInteger bucketValue = new AtomicInteger ();
454454 UserProfile userProfile = mock (UserProfile .class );
455- Bucketer algorithm = mockUserExperimentRecordAlgorithm (bucketValue , userProfile );
455+ Bucketer algorithm = mockUserProfileAlgorithm (bucketValue , userProfile );
456456 bucketValue .set (3000 );
457457
458458 ProjectConfig projectConfig = validProjectConfigV2 ();
@@ -474,10 +474,10 @@ public void bucketUserNotInOverlappingGroupExperiment() throws Exception {
474474 * Verify that {@link Bucketer#bucket(Experiment,String)} logs correctly
475475 * when a {@link UserProfile} is present and fails to save an activation.
476476 */
477- @ Test public void bucketUserSaveActivationFailWithUserExperimentRecord () throws Exception {
477+ @ Test public void bucketUserSaveActivationFailWithUserProfile () throws Exception {
478478 final AtomicInteger bucketValue = new AtomicInteger ();
479479 UserProfile userProfile = mock (UserProfile .class );
480- Bucketer algorithm = mockUserExperimentRecordAlgorithm (bucketValue , userProfile );
480+ Bucketer algorithm = mockUserProfileAlgorithm (bucketValue , userProfile );
481481 bucketValue .set (3000 );
482482
483483 ProjectConfig projectConfig = validProjectConfigV2 ();
@@ -499,10 +499,10 @@ public void bucketUserNotInOverlappingGroupExperiment() throws Exception {
499499 * Verify that {@link Bucketer#bucket(Experiment,String)} returns a variation that is
500500 * stored in the provided {@link UserProfile}.
501501 */
502- @ Test public void bucketUserRestoreActivationWithUserExperimentRecord () throws Exception {
502+ @ Test public void bucketUserRestoreActivationWithUserProfile () throws Exception {
503503 final AtomicInteger bucketValue = new AtomicInteger ();
504504 UserProfile userProfile = mock (UserProfile .class );
505- Bucketer algorithm = mockUserExperimentRecordAlgorithm (bucketValue , userProfile );
505+ Bucketer algorithm = mockUserProfileAlgorithm (bucketValue , userProfile );
506506 bucketValue .set (3000 );
507507
508508 ProjectConfig projectConfig = validProjectConfigV2 ();
@@ -516,7 +516,7 @@ public void bucketUserNotInOverlappingGroupExperiment() throws Exception {
516516
517517 logbackVerifier .expectMessage (Level .INFO ,
518518 "Returning previously activated variation \" e2_vtag1\" of experiment \" group_etag2\" "
519- + " for user \" blah\" from user experiment record ." );
519+ + " for user \" blah\" from user profile ." );
520520
521521 verify (userProfile ).lookup ("blah" , groupExperiment .getKey ());
522522 }
@@ -525,10 +525,10 @@ public void bucketUserNotInOverlappingGroupExperiment() throws Exception {
525525 * Verify {@link Bucketer#bucket(Experiment,String)} handles a present {@link UserProfile}
526526 * returning null when looking up a variation.
527527 */
528- @ Test public void bucketUserRestoreActivationNullWithUserExperimentRecord () throws Exception {
528+ @ Test public void bucketUserRestoreActivationNullWithUserProfile () throws Exception {
529529 final AtomicInteger bucketValue = new AtomicInteger ();
530530 UserProfile userProfile = mock (UserProfile .class );
531- Bucketer algorithm = mockUserExperimentRecordAlgorithm (bucketValue , userProfile );
531+ Bucketer algorithm = mockUserProfileAlgorithm (bucketValue , userProfile );
532532 bucketValue .set (3000 );
533533
534534 ProjectConfig projectConfig = validProjectConfigV2 ();
@@ -541,53 +541,53 @@ public void bucketUserNotInOverlappingGroupExperiment() throws Exception {
541541 assertThat (algorithm .bucket (groupExperiment , "blah" ), is (variation ));
542542
543543 logbackVerifier .expectMessage (Level .INFO , "No previously activated variation of experiment " +
544- "\" group_etag2\" for user \" blah\" found in user experiment record ." );
544+ "\" group_etag2\" for user \" blah\" found in user profile ." );
545545 verify (userProfile ).lookup ("blah" , groupExperiment .getKey ());
546546 }
547547
548548 /**
549- * Verify {@link Bucketer#cleanUserExperimentRecords ()} handles a null {@link UserProfile}.
549+ * Verify {@link Bucketer#cleanUserProfiles ()} handles a null {@link UserProfile}.
550550 */
551551 @ Test
552- public void nullUserExperimentRecordWhenCleaning () {
552+ public void nullUserProfileWhenCleaning () {
553553 final AtomicInteger bucketValue = new AtomicInteger ();
554554 Bucketer algorithm = mockBucketAlgorithm (bucketValue );
555555 bucketValue .set (3000 );
556556 try {
557- algorithm .cleanUserExperimentRecords ();
557+ algorithm .cleanUserProfiles ();
558558 } catch (NullPointerException e ) {
559559 fail ();
560560 }
561561 }
562562
563563 /**
564- * Verify {@link Bucketer#cleanUserExperimentRecords ()} handles a null returned from
564+ * Verify {@link Bucketer#cleanUserProfiles ()} handles a null returned from
565565 * {@link UserProfile#getAllRecords()}.
566566 */
567567 @ Test
568- public void nullUserExperimentRecords () {
568+ public void nullUserProfiles () {
569569 final AtomicInteger bucketValue = new AtomicInteger ();
570570 UserProfile userProfile = mock (UserProfile .class );
571- Bucketer algorithm = mockUserExperimentRecordAlgorithm (bucketValue , userProfile );
571+ Bucketer algorithm = mockUserProfileAlgorithm (bucketValue , userProfile );
572572 bucketValue .set (3000 );
573573
574574 when (userProfile .getAllRecords ()).thenReturn (null );
575575 try {
576- algorithm .cleanUserExperimentRecords ();
576+ algorithm .cleanUserProfiles ();
577577 } catch (NullPointerException e ) {
578578 fail ();
579579 }
580580 }
581581
582582 /**
583- * Verify {@link Bucketer#cleanUserExperimentRecords ()} removes experiments
583+ * Verify {@link Bucketer#cleanUserProfiles ()} removes experiments
584584 * that are no longer in the {@link ProjectConfig}.
585585 */
586586 @ Test
587587 public void cleanRemovesRecordsOfExperimentsThatNoLongerExist () {
588588 final AtomicInteger bucketValue = new AtomicInteger ();
589589 UserProfile userProfile = mock (UserProfile .class );
590- Bucketer algorithm = mockUserExperimentRecordAlgorithm (bucketValue , userProfile );
590+ Bucketer algorithm = mockUserProfileAlgorithm (bucketValue , userProfile );
591591 bucketValue .set (3000 );
592592
593593 Map <String ,Map <String ,String >> records = new HashMap <String , Map <String , String >>();
@@ -596,20 +596,20 @@ public void cleanRemovesRecordsOfExperimentsThatNoLongerExist() {
596596 records .put ("blah" , activation );
597597 when (userProfile .getAllRecords ()).thenReturn (records );
598598
599- algorithm .cleanUserExperimentRecords ();
599+ algorithm .cleanUserProfiles ();
600600
601601 verify (userProfile ).remove ("blah" , "exp1" );
602602 }
603603
604604 /**
605- * Verify {@link Bucketer#cleanUserExperimentRecords ()} removes experiments
605+ * Verify {@link Bucketer#cleanUserProfiles ()} removes experiments
606606 * that are paused in the {@link ProjectConfig}.
607607 */
608608 @ Test
609609 public void cleanRemovesRecordsOfExperimentsThatAreNotRunning () {
610610 final AtomicInteger bucketValue = new AtomicInteger ();
611611 UserProfile userProfile = mock (UserProfile .class );
612- Bucketer algorithm = mockUserExperimentRecordAlgorithm (bucketValue , userProfile );
612+ Bucketer algorithm = mockUserProfileAlgorithm (bucketValue , userProfile );
613613 bucketValue .set (3000 );
614614
615615 Map <String ,Map <String ,String >> records = new HashMap <String , Map <String , String >>();
@@ -618,7 +618,7 @@ public void cleanRemovesRecordsOfExperimentsThatAreNotRunning() {
618618 records .put ("blah" , activation );
619619 when (userProfile .getAllRecords ()).thenReturn (records );
620620
621- algorithm .cleanUserExperimentRecords ();
621+ algorithm .cleanUserProfiles ();
622622
623623 verify (userProfile ).remove ("blah" , "exp1" );
624624 }
@@ -647,7 +647,7 @@ int generateBucketValue(int hashCode) {
647647 * @param bucketValue the expected bucket value holder
648648 * @return the mock bucket algorithm
649649 */
650- private Bucketer mockUserExperimentRecordAlgorithm (final AtomicInteger bucketValue , final UserProfile userProfile ) {
650+ private Bucketer mockUserProfileAlgorithm (final AtomicInteger bucketValue , final UserProfile userProfile ) {
651651 return new Bucketer (validProjectConfigV2 (), userProfile ) {
652652 @ Override
653653 int generateBucketValue (int hashCode ) {
0 commit comments