@Test public void isResourceTypeExemptedFromCutOfDateCriteria() throws Exception { PowerMockito.mockStatic(CommonUtils.class); PowerMockito.when(CommonUtils.doHttpPost(anyString(),anyString(),anyMap())).thenReturn(""); PowerMockito.when(CommonUtils.doHttpPost(anyString(),anyString())).thenReturn(""); PowerMockito.when(CommonUtils.getPropValue(anyString())).thenCallRealMethod(); final AutoFixManager classUnderTest = PowerMockito.spy(new AutoFixManager()); Whitebox.invokeMethod(classUnderTest, "isResourceTypeExemptedFromCutOfDateCriteria", "targetType123"); }
private boolean isResourceTypeExemptedFromCutOfDateCriteria(String targetType) { try { List<String> exemptedtypes = Arrays .asList(CommonUtils.getPropValue(PacmanSdkConstants.AUTOFIX_EXEMPTED_TYPES_KEY).split("\\s*,\\s*")); return exemptedtypes.contains(targetType); } catch (Exception e) { logger.error("error in isResourceTypeExemptedFromCutOfDateCriteria {}",e); return false; } }
AutoFixManager { private boolean isResourceTypeExemptedFromCutOfDateCriteria(String targetType) { try { List<String> exemptedtypes = Arrays .asList(CommonUtils.getPropValue(PacmanSdkConstants.AUTOFIX_EXEMPTED_TYPES_KEY).split("\\s*,\\s*")); return exemptedtypes.contains(targetType); } catch (Exception e) { logger.error("error in isResourceTypeExemptedFromCutOfDateCriteria {}",e); return false; } } }
AutoFixManager { private boolean isResourceTypeExemptedFromCutOfDateCriteria(String targetType) { try { List<String> exemptedtypes = Arrays .asList(CommonUtils.getPropValue(PacmanSdkConstants.AUTOFIX_EXEMPTED_TYPES_KEY).split("\\s*,\\s*")); return exemptedtypes.contains(targetType); } catch (Exception e) { logger.error("error in isResourceTypeExemptedFromCutOfDateCriteria {}",e); return false; } } AutoFixManager(); }
AutoFixManager { private boolean isResourceTypeExemptedFromCutOfDateCriteria(String targetType) { try { List<String> exemptedtypes = Arrays .asList(CommonUtils.getPropValue(PacmanSdkConstants.AUTOFIX_EXEMPTED_TYPES_KEY).split("\\s*,\\s*")); return exemptedtypes.contains(targetType); } catch (Exception e) { logger.error("error in isResourceTypeExemptedFromCutOfDateCriteria {}",e); return 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 isResourceTypeExemptedFromCutOfDateCriteria(String targetType) { try { List<String> exemptedtypes = Arrays .asList(CommonUtils.getPropValue(PacmanSdkConstants.AUTOFIX_EXEMPTED_TYPES_KEY).split("\\s*,\\s*")); return exemptedtypes.contains(targetType); } catch (Exception e) { logger.error("error in isResourceTypeExemptedFromCutOfDateCriteria {}",e); return false; } } AutoFixManager(); Map<String, Object> performAutoFixs(Map<String, String> ruleParam,
            Map<String, List<IssueException>> exemptedResourcesForRule,
            Map<String, IssueException> individuallyExcemptedIssues); static void main(String[] args);  }