Your current code adds the same list of connections for all the stations added to the map. That can't be right, since every station has its own list of connections.
addStation()
should add a station to the map, with a new empty list as value.
addConnection()
should get the list of connections associated to the station in the map, and should add a station to this list.
Just a few additional notes:
- the type of the Map should be
Map<String, List<String>>
- you could use Guava, which has Multimaps, making this process easier: no need to care about initializing an empty list, be able to add directly to the multimap instead of getting the list out of it and adding to the list.