@@ -2641,6 +2641,7 @@ private DecisionNotificationListener getDecisionListener(final String testType,
26412641 public void onDecision (@ Nonnull String type , @ Nonnull String userId , @ Nonnull Map <String , ?> attributes , @ Nonnull Map <String , ?> decisionInfo ) {
26422642 assertEquals (type , testType );
26432643 assertEquals (userId , testUserId );
2644+ assertEquals (attributes , testUserAttributes );
26442645 for (Map .Entry <String , ?> entry : attributes .entrySet ()) {
26452646 assertEquals (testUserAttributes .get (entry .getKey ()), entry .getValue ());
26462647 }
@@ -2702,7 +2703,7 @@ public void getFeatureVariableWithListenerUserInExperimentFeatureOn() throws Exc
27022703 /**
27032704 * Verify that the {@link Optimizely#getFeatureVariableString(String, String, String, Map)}
27042705 * notification listener of getFeatureVariableString is called when feature is in experiment and feature enabled is false
2705- * than default value will get returned
2706+ * than default value will get returned and passing null attribute will send empty map instead of null
27062707 */
27072708 @ Test
27082709 public void getFeatureVariableWithListenerUserInExperimentFeatureOff () {
@@ -2718,7 +2719,6 @@ public void getFeatureVariableWithListenerUserInExperimentFeatureOff() {
27182719 .build ();
27192720
27202721 final Map <String , String > testUserAttributes = new HashMap <>();
2721- testUserAttributes .put (ATTRIBUTE_HOUSE_KEY , AUDIENCE_GRYFFINDOR_VALUE );
27222722
27232723 final Map <String , Object > testDecisionInfoMap = new HashMap <>();
27242724 testDecisionInfoMap .put (DecisionInfoEnums .GetFeatureVariableDecisionInfo .SOURCE_EXPERIMENT_KEY .toString (), "multivariate_experiment" );
@@ -2740,7 +2740,7 @@ public void getFeatureVariableWithListenerUserInExperimentFeatureOff() {
27402740 validFeatureKey ,
27412741 validVariableKey ,
27422742 userID ,
2743- Collections . singletonMap ( ATTRIBUTE_HOUSE_KEY , AUDIENCE_GRYFFINDOR_VALUE ) ),
2743+ null ),
27442744 expectedValue );
27452745
27462746 assertTrue (optimizely .notificationCenter .removeNotificationListener (notificationId ));
0 commit comments