Adding message event and tests