You are on the right track, the set_val needs to override the initial (key, value) (if present) and start afresh (as seen from python code):

def set_val(key:String,value:String)={
  if (internalStorage.contains(key)) 
    internalStorage.remove(key); // to start fresh

Also, as the internalStorage is being accessed only using Storage, you might want to make it private.

private[this] val internalStorage=new HashMap[String, Set[String]] with MultiMap[String, String]

Related Query

More Query from same tag