@Test public void getCerticatesSummaryTest_Exception() throws Exception { when(certificateRepository.getCertificatesSummary(anyString())).thenThrow(new DataException()); assertThatThrownBy(() ->certificateService.getCerticatesSummary("ag")) .isInstanceOf(ServiceException.class); }
public Map<String, Object> getCerticatesSummary(String assetGroup) throws ServiceException { try{ return certificateRepository.getCertificatesSummary(assetGroup); }catch(DataException e){ throw new ServiceException(e); } }
CertificateService { public Map<String, Object> getCerticatesSummary(String assetGroup) throws ServiceException { try{ return certificateRepository.getCertificatesSummary(assetGroup); }catch(DataException e){ throw new ServiceException(e); } } }
CertificateService { public Map<String, Object> getCerticatesSummary(String assetGroup) throws ServiceException { try{ return certificateRepository.getCertificatesSummary(assetGroup); }catch(DataException e){ throw new ServiceException(e); } }  }
CertificateService { public Map<String, Object> getCerticatesSummary(String assetGroup) throws ServiceException { try{ return certificateRepository.getCertificatesSummary(assetGroup); }catch(DataException e){ throw new ServiceException(e); } }  Map<String, Object> getCerticatesExpiryByApplication(
            String assetGroup); List<Map<String, Object>> getCerticatesDetails(String assetGroup,
            String searchText, Map<String, String> filter); Map<String, Object> getCerticatesSummary(String assetGroup); }
CertificateService { public Map<String, Object> getCerticatesSummary(String assetGroup) throws ServiceException { try{ return certificateRepository.getCertificatesSummary(assetGroup); }catch(DataException e){ throw new ServiceException(e); } }  Map<String, Object> getCerticatesExpiryByApplication(
            String assetGroup); List<Map<String, Object>> getCerticatesDetails(String assetGroup,
            String searchText, Map<String, String> filter); Map<String, Object> getCerticatesSummary(String assetGroup);  }