@Test public void convertSingleCertificateAuthorityDiagnostics() { OcspResponderDiagnosticsStatus status = new OcspResponderDiagnosticsStatus(CA_NAME_1); DiagnosticsStatus diagnosticsStatus = new DiagnosticsStatus( DiagnosticsErrorCodes.RETURN_SUCCESS, PREVIOUS_UPDATE_1, NEXT_UPDATE_1); diagnosticsStatus.setDescription(URL_1); status.setOcspResponderStatusMap(Arrays.asList(diagnosticsStatus)); OcspResponderDiagnostics caDiagnostics = ocspResponderDiagnosticConverter.convert(status); assertEquals(1, caDiagnostics.getOcspResponders().size()); assertEquals(CA_NAME_1, caDiagnostics.getDistinguishedName()); assertEquals(OcspStatus.SUCCESS, caDiagnostics.getOcspResponders().get(0).getStatusCode()); assertEquals(DiagnosticStatusClass.OK, caDiagnostics.getOcspResponders().get(0).getStatusClass()); assertEquals(PREVIOUS_UPDATE_1, caDiagnostics.getOcspResponders().get(0).getPrevUpdateAt()); assertEquals(NEXT_UPDATE_1, caDiagnostics.getOcspResponders().get(0).getNextUpdateAt()); assertEquals(URL_1, caDiagnostics.getOcspResponders().get(0).getUrl()); }
public OcspResponderDiagnostics convert( OcspResponderDiagnosticsStatus ocspResponderDiagnosticsStatus) { OcspResponderDiagnostics ocspResponderDiagnostics = new OcspResponderDiagnostics(); ocspResponderDiagnostics.setDistinguishedName(ocspResponderDiagnosticsStatus.getName()); List<OcspResponder> ocspResponders = convertOcspResponders( ocspResponderDiagnosticsStatus.getOcspResponderStatusMap()); ocspResponderDiagnostics.setOcspResponders(ocspResponders); return ocspResponderDiagnostics; }
OcspResponderDiagnosticConverter { public OcspResponderDiagnostics convert( OcspResponderDiagnosticsStatus ocspResponderDiagnosticsStatus) { OcspResponderDiagnostics ocspResponderDiagnostics = new OcspResponderDiagnostics(); ocspResponderDiagnostics.setDistinguishedName(ocspResponderDiagnosticsStatus.getName()); List<OcspResponder> ocspResponders = convertOcspResponders( ocspResponderDiagnosticsStatus.getOcspResponderStatusMap()); ocspResponderDiagnostics.setOcspResponders(ocspResponders); return ocspResponderDiagnostics; } }
OcspResponderDiagnosticConverter { public OcspResponderDiagnostics convert( OcspResponderDiagnosticsStatus ocspResponderDiagnosticsStatus) { OcspResponderDiagnostics ocspResponderDiagnostics = new OcspResponderDiagnostics(); ocspResponderDiagnostics.setDistinguishedName(ocspResponderDiagnosticsStatus.getName()); List<OcspResponder> ocspResponders = convertOcspResponders( ocspResponderDiagnosticsStatus.getOcspResponderStatusMap()); ocspResponderDiagnostics.setOcspResponders(ocspResponders); return ocspResponderDiagnostics; }  }
OcspResponderDiagnosticConverter { public OcspResponderDiagnostics convert( OcspResponderDiagnosticsStatus ocspResponderDiagnosticsStatus) { OcspResponderDiagnostics ocspResponderDiagnostics = new OcspResponderDiagnostics(); ocspResponderDiagnostics.setDistinguishedName(ocspResponderDiagnosticsStatus.getName()); List<OcspResponder> ocspResponders = convertOcspResponders( ocspResponderDiagnosticsStatus.getOcspResponderStatusMap()); ocspResponderDiagnostics.setOcspResponders(ocspResponders); return ocspResponderDiagnostics; }  OcspResponderDiagnostics convert(
            OcspResponderDiagnosticsStatus ocspResponderDiagnosticsStatus); List<OcspResponderDiagnostics> convert(Iterable<OcspResponderDiagnosticsStatus> statuses); }
OcspResponderDiagnosticConverter { public OcspResponderDiagnostics convert( OcspResponderDiagnosticsStatus ocspResponderDiagnosticsStatus) { OcspResponderDiagnostics ocspResponderDiagnostics = new OcspResponderDiagnostics(); ocspResponderDiagnostics.setDistinguishedName(ocspResponderDiagnosticsStatus.getName()); List<OcspResponder> ocspResponders = convertOcspResponders( ocspResponderDiagnosticsStatus.getOcspResponderStatusMap()); ocspResponderDiagnostics.setOcspResponders(ocspResponders); return ocspResponderDiagnostics; }  OcspResponderDiagnostics convert(
            OcspResponderDiagnosticsStatus ocspResponderDiagnosticsStatus); List<OcspResponderDiagnostics> convert(Iterable<OcspResponderDiagnosticsStatus> statuses);  }