added unit test for logging stats events to r index