title: Duplicates values in Map: Kotlin
body: <p>I have a scenario whereby I need a map containing duplicate keys and values. I have created a list first and then I used associatedBy to convert them to a map, however the duplicates issue is not taken into account. Here is my implementation:</p>
  <pre><code>class State(private val startStatus: Status, private val expectedStatus: Status) {
    
    companion object StatusList {
      val listStatuses = listOf(
        State(Status.A, Status.B),
        State(Status.B, Status.A),
        State(Status.B, Status.C),
        State(Status.C, Status.B),
        State(Status.C, Status.E),
        State(Status.C, Status.D),
        State(Status.D, Status.B),
        State(Status.E, Status.C),
        State(Status.E, Status.B)
      )
    
      open fun mapStatuses(): Map&lt;Status, Collection&lt;Status&gt;&gt; {
        return listStatuses.associateBy(
          keySelector = { key -&gt; key.expectedStatus },
          valueTransform = State::startStatus)
      }
    }
  }
  </code></pre>
  <p>I am struggling to find a Multimap in Kotlin that would allow me to deal with duplicates. Can you help?</p>
  <p>Thanks</p>