Class JclMockPolicy

All Implemented Interfaces:
PowerMockPolicy

public class JclMockPolicy extends AbstractEasyMockLogPolicyBase
A Jakarta Commons-Logging (JCL) mock policy. This mock policy deals with solving JCL related mocking issues. It takes care of loading all concerned JCL classes through the correct class-loader and automatically prepares and injects logger instances. This policy does the following:
  1. Prepares all classes in the org.apache.commons.logging for test as well as org.apache.log4j.Appender and org.apache.log4j.xml.DOMConfigurator.
  2. All calls to the org.apache.commons.logging.LogFactory#getLog(..) methods are intercepted and returns a nice mock of type org.apache.commons.logging.Log.