public void AddUserAttribute_LastInWins() { var key = "testKey"; var valueA = "valueA"; var valueB = "valueB"; var metadata = new TransactionMetadata(); metadata.AddUserAttribute(key, valueA); metadata.AddUserAttribute(key, valueB); var immutableTransactionMetadata = metadata.ConvertToImmutableMetadata(); var userAttributes = immutableTransactionMetadata.UserAttributes.ToDictionary(); var result = userAttributes[key]; Assert.AreEqual(result, valueB); }