I have a map 

```
HashMap<String, List<SomeObject>> map = data();

```

I need to traverse the list of objects and map it to another object and then collect to another list of object. Sample code is below, How can I do it in a proper way?

```
 List<User> userList = new ArrayList<>();
 map.forEach((key, value) ->
    userList = value.stream()
                .filter(obj-> testSomeCondition(obj))
                .map(obj -> mapper.mapToUser(obj,key))
                .collect(Collectors.toList())
 );

```