mock serialization facory in test, and explicit imports in contact manager