Moved demo code into test