Fixed unstable test (issue with different behaviour depending on JDK and OS version).

- reorganised imports
- added sorting (list of albums) before asserting
- reordered the asserts