I am writing an application which checks if the method is sythentic or bridge. For testing this application I have added various methods in my stub. But for none of the method this block is getting covered in the test case. Stub contains methods like validate(Object o) ,etc its just like any other normal java class.
What kind of method should I add in my stub so this line will get covered?
code :
Method[] methods = inputClass.getMethods();
for (Method method : methods) {
if (method.isSynthetic() || method.isBridge()) {
isInternal = true;
}
// More code.
}