fix(visualization-generator): generator and test

- Fix visualization generator: handle the __repr__ added methods, and prefix attribute;
- Fix test method