Replace yet another way of making messages in tests. Also remove unused import. (@Hodgestar)