I needed to throw a callout exception by hardcoding it in test class for batch class.Is there any method to do that ?
try{
XXXX
} catch (CalloutException excpObj) {
insertInterfaceTrace(accObj.Id,' Callout Exception','---- ERROR = '+ excpObj.getMessage(),accObj);
}
The catch block needs to be covered in test class.But don't know how to hardcode a callout exception in catch block