@Test public void getPatchingWindowTest() { when(rdsrepository.count(anyString())).thenReturn(2); int count = patchingRepositoryImpl.getPatchingWindow(); assertTrue(count > 0); when(rdsrepository.count(anyString())).thenThrow(new RuntimeException()); count = patchingRepositoryImpl.getPatchingWindow(); assertTrue(count < 0); }
@Override public int getPatchingWindow() { try { String query = "select value from cf_SystemConfiguration where keyname = 'pacman.patching.compliance.window'"; return rdsrepository.count(query); } catch (Exception e) { logger.error(e); return -1; } }
PatchingRepositoryImpl implements PatchingRepository, Constants { @Override public int getPatchingWindow() { try { String query = "select value from cf_SystemConfiguration where keyname = 'pacman.patching.compliance.window'"; return rdsrepository.count(query); } catch (Exception e) { logger.error(e); return -1; } } }
PatchingRepositoryImpl implements PatchingRepository, Constants { @Override public int getPatchingWindow() { try { String query = "select value from cf_SystemConfiguration where keyname = 'pacman.patching.compliance.window'"; return rdsrepository.count(query); } catch (Exception e) { logger.error(e); return -1; } }  }
PatchingRepositoryImpl implements PatchingRepository, Constants { @Override public int getPatchingWindow() { try { String query = "select value from cf_SystemConfiguration where keyname = 'pacman.patching.compliance.window'"; return rdsrepository.count(query); } catch (Exception e) { logger.error(e); return -1; } }  @Override List<Map<String, Object>> getPatchingProgress(String assetGroup,
            LocalDate startDate, LocalDate endDate); @Override List<Map<String, Object>> getIssueInfo(String assetGroup); List<Map<String, Object>> getClosedIssueInfo(String assetGroup,
            int size); @Override List<Map<String, Object>> getInstanceInfo(String assetGroup,
            Map<String, String> filters); @Override List<Map<String, Object>> getExecAndDirectorInfo(); @Override long getInstanceInfoCount(String assetGroup,
            Map<String, String> filters, String searchText); @Override String getAmilAvailDate(int year, int quarter); @Override int getPatchingWindow(); @Override Map<String, Long> getQuartersWithPatchingData(String assetGroup); Map<String, Object> addParentConditionPatching(String targetType); @Override List<Map<String, Object>> getOnpremIssueInfo(String assetGroup); @Override List<Map<String, Object>> getOnpremResourceInfo(String assetGroup,
            Map<String, String> filters); @Override Map<String, Object> getDirectorsAndExcutiveSponsers(String appTag,
            String appType); @Override Map<String, Long> getNonCompliantNumberForAgAndResourceType(
            String assetGroup, String resourceType); @Override List<Map<String, Object>> getPatchingPercentForDateRange(String assetGroup, LocalDate fromDate,
			LocalDate toDate); }
PatchingRepositoryImpl implements PatchingRepository, Constants { @Override public int getPatchingWindow() { try { String query = "select value from cf_SystemConfiguration where keyname = 'pacman.patching.compliance.window'"; return rdsrepository.count(query); } catch (Exception e) { logger.error(e); return -1; } }  @Override List<Map<String, Object>> getPatchingProgress(String assetGroup,
            LocalDate startDate, LocalDate endDate); @Override List<Map<String, Object>> getIssueInfo(String assetGroup); List<Map<String, Object>> getClosedIssueInfo(String assetGroup,
            int size); @Override List<Map<String, Object>> getInstanceInfo(String assetGroup,
            Map<String, String> filters); @Override List<Map<String, Object>> getExecAndDirectorInfo(); @Override long getInstanceInfoCount(String assetGroup,
            Map<String, String> filters, String searchText); @Override String getAmilAvailDate(int year, int quarter); @Override int getPatchingWindow(); @Override Map<String, Long> getQuartersWithPatchingData(String assetGroup); Map<String, Object> addParentConditionPatching(String targetType); @Override List<Map<String, Object>> getOnpremIssueInfo(String assetGroup); @Override List<Map<String, Object>> getOnpremResourceInfo(String assetGroup,
            Map<String, String> filters); @Override Map<String, Object> getDirectorsAndExcutiveSponsers(String appTag,
            String appType); @Override Map<String, Long> getNonCompliantNumberForAgAndResourceType(
            String assetGroup, String resourceType); @Override List<Map<String, Object>> getPatchingPercentForDateRange(String assetGroup, LocalDate fromDate,
			LocalDate toDate);  }