Issue #27 Moving the common function out of Factory into an abstract base class and adding a unit test for hadoop1