Factory based testing