I have tried as below : 

```
for (Object[] trials: trialSpecs) {
    Object[] result= (Object[]) trials;
    multiValueMap.put((Integer) result[0], new ArrayList<Integer>());
    multiValueMap.get(result[0]).add((Integer)result[1]);
}

```

But every time the new value is replaced with the old value. I know this is because of `new ArrayList<Integer>` I used in the code.

But I am not able to replace this block.