test framework: add factory function and default parameters