I can never remember how to create a Map, but let's try. You can get a
Stream out of any
Collection with its
stream() method. There is also a parallelStream method, but I can see no point in parallelism for a five‑element List. So line 2 creates that
List Stream.
You can collect the contents of a Stream into something with the
collect() method (line 3). That takes a
Collector instance as its parameter (overloaded method), and the easiest way to find a Collector is with a method of the
Collectors class.
This is a method that returns a Collector to create a Map.
Actually both the collect method and the Collector link show examples of the usage of groupingBy, which makes it easier to work out what to write

.
I am not sure whether that is what you really wanted, but it is as far as I can remember just at the moment. Somebody else will doubtess give a better suggestion.
The idiom
ErrorMessage::getErrorType is called a
method reference and you can read about it in that Java™ Tutorials link.
Note the different indentation from what you are used to: make the dot operators line up vertically.