Refactors the pet store's id to name mapping by replacing its multiple internal maps with a bidirectional multimap. Also fixes what is probably a bug in the follow() functionality, where add and remove events were published for redundant write() calls. Tests of the existing behavior were added before the refactor, then updated for the new behavior.
Note: The bidirectional multimap may also be used for followReverseLocate(), which will be introduced in a follow-up.
Refactors the pet store's id to name mapping by replacing its multiple internal maps with a bidirectional multimap. Also fixes what is probably a bug in the
follow()
functionality, whereadd
andremove
events were published for redundantwrite()
calls. Tests of the existing behavior were added before the refactor, then updated for the new behavior.Note: The bidirectional multimap may also be used for
followReverseLocate()
, which will be introduced in a follow-up.