Add ResponceFactoryBase tests and fix bugs.