added factory for mock objects and added some tests, also minor refactoring with mapper packages
refactoring