The Federation Service encountered an error while loading the trust policy. The specified class was found in the custom module ...

The Federation Service encountered an error while loading the trust policy. The specified class was found in the custom module assembly, but the class does not implement the required AD FS interface. 
Assembly path: %1 
Class name: %2 
Interface name: %3 

If this error occurs during startup of the Federation Service, the Federation Service will be not be able to start, and all requests to the Federation Service will fail until the configuration is corrected. If this error occurs while the Federation Service is running, the Federation Service will continue to use the last trust policy that was loaded successfully. 

This error may be generated by a non-Microsoft module that is not part of AD FS. 

User Action 
Verify that the appropriate assembly and class are configured. Contact the module vendor for further troubleshooting steps.