PER-107: reworked how messages are mocked
PER-107: fixed a few remaining failing tests
PER-107: fixed a few strict warnings