Introduced message correlation and simplified message handling in unit
tests.