@Test public void getCertificatesSummaryTest_NoAg() throws Exception { ResponseEntity<Object> responseObj = certificateController.getCertificatesSummary(""); assertTrue(responseObj.getStatusCode() == HttpStatus.EXPECTATION_FAILED); }
@RequestMapping(path = "/v1/certificates/summary", method = RequestMethod.GET) public ResponseEntity<Object> getCertificatesSummary( @RequestParam(name = "ag", required = true) String assetGroup) throws ServiceException { if (Strings.isNullOrEmpty(assetGroup)) { return ResponseUtils.buildFailureResponse(new ServiceException( ASSET_MANDATORY)); } DitributionDTO response; try { response = new DitributionDTO( certificateService.getCerticatesSummary(assetGroup)); } catch (ServiceException e) { LOGGER.error(EXE_CERT_EXPIRY , e.getMessage()); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); }
CertificateController implements Constants { @RequestMapping(path = "/v1/certificates/summary", method = RequestMethod.GET) public ResponseEntity<Object> getCertificatesSummary( @RequestParam(name = "ag", required = true) String assetGroup) throws ServiceException { if (Strings.isNullOrEmpty(assetGroup)) { return ResponseUtils.buildFailureResponse(new ServiceException( ASSET_MANDATORY)); } DitributionDTO response; try { response = new DitributionDTO( certificateService.getCerticatesSummary(assetGroup)); } catch (ServiceException e) { LOGGER.error(EXE_CERT_EXPIRY , e.getMessage()); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); } }
CertificateController implements Constants { @RequestMapping(path = "/v1/certificates/summary", method = RequestMethod.GET) public ResponseEntity<Object> getCertificatesSummary( @RequestParam(name = "ag", required = true) String assetGroup) throws ServiceException { if (Strings.isNullOrEmpty(assetGroup)) { return ResponseUtils.buildFailureResponse(new ServiceException( ASSET_MANDATORY)); } DitributionDTO response; try { response = new DitributionDTO( certificateService.getCerticatesSummary(assetGroup)); } catch (ServiceException e) { LOGGER.error(EXE_CERT_EXPIRY , e.getMessage()); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); }  }
CertificateController implements Constants { @RequestMapping(path = "/v1/certificates/summary", method = RequestMethod.GET) public ResponseEntity<Object> getCertificatesSummary( @RequestParam(name = "ag", required = true) String assetGroup) throws ServiceException { if (Strings.isNullOrEmpty(assetGroup)) { return ResponseUtils.buildFailureResponse(new ServiceException( ASSET_MANDATORY)); } DitributionDTO response; try { response = new DitributionDTO( certificateService.getCerticatesSummary(assetGroup)); } catch (ServiceException e) { LOGGER.error(EXE_CERT_EXPIRY , e.getMessage()); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); }  @RequestMapping(path = "/v1/certificates/expirybyapplication", method = RequestMethod.GET) ResponseEntity<Object> getCerticatesExpiryByApplication(
            @RequestParam(name = "ag", required = true) String assetGroup); @RequestMapping(path = "/v1/certificates/detail", method = RequestMethod.POST) ResponseEntity<Object> getCertificatesDetails(
            @RequestBody(required = true) Request request); @RequestMapping(path = "/v1/certificates/summary", method = RequestMethod.GET) ResponseEntity<Object> getCertificatesSummary(
            @RequestParam(name = "ag", required = true) String assetGroup); }
CertificateController implements Constants { @RequestMapping(path = "/v1/certificates/summary", method = RequestMethod.GET) public ResponseEntity<Object> getCertificatesSummary( @RequestParam(name = "ag", required = true) String assetGroup) throws ServiceException { if (Strings.isNullOrEmpty(assetGroup)) { return ResponseUtils.buildFailureResponse(new ServiceException( ASSET_MANDATORY)); } DitributionDTO response; try { response = new DitributionDTO( certificateService.getCerticatesSummary(assetGroup)); } catch (ServiceException e) { LOGGER.error(EXE_CERT_EXPIRY , e.getMessage()); return ResponseUtils.buildFailureResponse(e); } return ResponseUtils.buildSucessResponse(response); }  @RequestMapping(path = "/v1/certificates/expirybyapplication", method = RequestMethod.GET) ResponseEntity<Object> getCerticatesExpiryByApplication(
            @RequestParam(name = "ag", required = true) String assetGroup); @RequestMapping(path = "/v1/certificates/detail", method = RequestMethod.POST) ResponseEntity<Object> getCertificatesDetails(
            @RequestBody(required = true) Request request); @RequestMapping(path = "/v1/certificates/summary", method = RequestMethod.GET) ResponseEntity<Object> getCertificatesSummary(
            @RequestParam(name = "ag", required = true) String assetGroup);  }