Polishing

The anonymous parent case didn't work. Since the generated
bean name was never registered, two or more anonymous listener-container
elements got the same generated name, causing collisions.

Generate the anonymous name internally.

For the test case, reset the instance variable for each test.