[factory] add tests