New method getByParent with test in AbstractFactory