factory design pattern with lettuce testing