Refactor test demo for better clarity