Basic message repository functionality with tests