Apex
How to get test coverage of code that uses Client methods
after you've built code that uses cldfs client methods in your sandbox, you would need to get more than 75% test coverage to have it deployed to production this means writing specific test classes/methods for your code utilizing this functionality by salesforce cldfs client methods however might make multiple callouts for their utility, and since the implementation of these methods is part of managed package code, you can't set mocks for individual callouts using test setmock cloudfiles thus provides another class cldfs clientfactory which automatically returns mocked responses depending on the context i e test/runtime this section covers details on how to get coverage for your classes utilizing cloudfiles' methods including simple and complex examples about clientfactory docid\ kjscoqk3cmnoqi130pvpy as the name suggests, cldfs clientfactory is a class built on the factory pattern which returns a runtime instance or a test instance depending on the context read this article to know more