NCLMMockUtil { public CertificateData getRenewCertificateMockData(){ DateTimeFormatter formatter= DateTimeFormatter.ofPattern("uuuu-MM-dd'T'HH:mm:ssXXX"); OffsetDateTime now = OffsetDateTime.now(ZoneId.of("-07:00")); String fromDate = now.format(formatter); int endYear = Integer.parseInt(fromDate.substring(0,4))+1; CertificateData certificateData = new CertificateData(); certificateData.setCertificateId(1234); certificateData.setCreateDate(now.format(formatter)); certificateData.setExpiryDate(endYear +fromDate.substring(4)); certificateData.setCertificateStatus("Active"); return certificateData; } NCLMMockUtil(); CertResponse getRevocationMockResponse(); CertificateData getRenewCertificateMockData(); CertResponse getRenewMockResponse(); CertResponse getDeleteMockResponse(); CertificateData getDeleteCertMockResponse(Map<String, String>  metaDataParams); CertManagerLogin getMockLoginDetails(); CertResponse getEnrollMockResponse(); CertificateData getMockCertificateData(SSLCertificateRequest sslCertificateRequest); CertResponse getMockRevocationReasons(); CertificateData getMockDataForRevoked();  }
@Test public void getRenewCertificateMockData_Test() { CertificateData certificateData = nclmMockUtil.getRenewCertificateMockData(); assertNotNull(certificateData); }