Merge "Refactor stats collection test"