Moved TestFactory into core package.