Factored out common code
Test reading file with multiple messages