Add unit testing for scaffold listener