Refactored stats viewing test

Signed-off-by: Bebe Peng <bebepeng@gmail.com>