@Test public void isAFixCandidate() throws Exception{ Method isFixCandidateMethod = null;; Object fixObject = null; String resourceId = "resourceId"; String targetType= "targetType"; Map<String, Object> clientMap = Maps.newHashMap(); clientMap.put("field123", "field123"); clientMap.put("field234", "field234"); clientMap.put("field345", "field345"); final AutoFixManager classUnderTest = PowerMockito.spy(new AutoFixManager()); Whitebox.invokeMethod(classUnderTest, "isAFixCandidate", isFixCandidateMethod, fixObject, resourceId, targetType, clientMap, clientMap, clientMap); }
private boolean isAFixCandidate(Method isFixCandidateMethod, Object fixObject, String resourceId, String targetType, Map<String, Object> clientMap, Map<String, String> ruleParam, Map<String, String> annotation) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { try{ Boolean isFixCandidate = null==isFixCandidateMethod?true:(Boolean)isFixCandidateMethod.invoke(fixObject, resourceId, targetType, clientMap, ruleParam,annotation); logger.debug("is fix candidate ==> {} ",isFixCandidate); return isFixCandidate; }catch(Exception e){ logger.error("error executing is fix candidate ",e); return Boolean.FALSE; } }
AutoFixManager { private boolean isAFixCandidate(Method isFixCandidateMethod, Object fixObject, String resourceId, String targetType, Map<String, Object> clientMap, Map<String, String> ruleParam, Map<String, String> annotation) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { try{ Boolean isFixCandidate = null==isFixCandidateMethod?true:(Boolean)isFixCandidateMethod.invoke(fixObject, resourceId, targetType, clientMap, ruleParam,annotation); logger.debug("is fix candidate ==> {} ",isFixCandidate); return isFixCandidate; }catch(Exception e){ logger.error("error executing is fix candidate ",e); return Boolean.FALSE; } } }
AutoFixManager { private boolean isAFixCandidate(Method isFixCandidateMethod, Object fixObject, String resourceId, String targetType, Map<String, Object> clientMap, Map<String, String> ruleParam, Map<String, String> annotation) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { try{ Boolean isFixCandidate = null==isFixCandidateMethod?true:(Boolean)isFixCandidateMethod.invoke(fixObject, resourceId, targetType, clientMap, ruleParam,annotation); logger.debug("is fix candidate ==> {} ",isFixCandidate); return isFixCandidate; }catch(Exception e){ logger.error("error executing is fix candidate ",e); return Boolean.FALSE; } } AutoFixManager(); }
AutoFixManager { private boolean isAFixCandidate(Method isFixCandidateMethod, Object fixObject, String resourceId, String targetType, Map<String, Object> clientMap, Map<String, String> ruleParam, Map<String, String> annotation) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { try{ Boolean isFixCandidate = null==isFixCandidateMethod?true:(Boolean)isFixCandidateMethod.invoke(fixObject, resourceId, targetType, clientMap, ruleParam,annotation); logger.debug("is fix candidate ==> {} ",isFixCandidate); return isFixCandidate; }catch(Exception e){ logger.error("error executing is fix candidate ",e); return Boolean.FALSE; } } AutoFixManager(); Map<String, Object> performAutoFixs(Map<String, String> ruleParam,
            Map<String, List<IssueException>> exemptedResourcesForRule,
            Map<String, IssueException> individuallyExcemptedIssues); static void main(String[] args); }
AutoFixManager { private boolean isAFixCandidate(Method isFixCandidateMethod, Object fixObject, String resourceId, String targetType, Map<String, Object> clientMap, Map<String, String> ruleParam, Map<String, String> annotation) throws IllegalAccessException, IllegalArgumentException, InvocationTargetException { try{ Boolean isFixCandidate = null==isFixCandidateMethod?true:(Boolean)isFixCandidateMethod.invoke(fixObject, resourceId, targetType, clientMap, ruleParam,annotation); logger.debug("is fix candidate ==> {} ",isFixCandidate); return isFixCandidate; }catch(Exception e){ logger.error("error executing is fix candidate ",e); return Boolean.FALSE; } } AutoFixManager(); Map<String, Object> performAutoFixs(Map<String, String> ruleParam,
            Map<String, List<IssueException>> exemptedResourcesForRule,
            Map<String, IssueException> individuallyExcemptedIssues); static void main(String[] args);  }