Be stricter about the number of messages when testing profiler service

It's better to fail a test than to crash on invalid array access later.

Change-Id: Ia3d24218eba80f362908979720657312c8c6cd67
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>