[Cleanup] Fix trivial errors found by eclipse

- "Organize imports"
- remove unused member myTestList
[Refactor] Extract method as first step to clean up the unit test.

First cleaning up the test, then I'll rewrite it to force a clearer
interface upon the ComponentQuery.
[Refactor] Reformat code.
[Refactor] Add cleaner interface for ComponentQuery

The new interface shall replace the old one in a later step, but for now
they can coexist easily.
This commit also changes one unit test to the new interface,
thus documenting that both methods work as expected.