@Test(expected = Exception.class)
public void testGetCertificateMetaDataFailed() {

    UserDetails userDetails = getMockUser(true);
    userDetails.setUsername(ADMIN_USER);        
    String certificatePath = SSLCertificateConstants.SSL_CERT_PATH + '/' + CERT_NAME;
    
    Response responseObj = getMockResponse(HttpStatus.OK, true, "{ \"data\": [\"akmid\":\"103001\",\"applicationName\":\"tvt\", "
      		+ " \"applicationOwnerEmailId\":\"appowneremail@test.com\", \"applicationTag\":\"T-Vault\", "
      		+ " \"authority\":\"T-Mobile Issuing CA 01 - SHA2\", \"certCreatedBy\": \"testuser1\", "
      		+ " \"certOwnerEmailId\":\"owneremail@test.com\", \"certOwnerNtid\": \"testuser1\", \"certType\": \"internal\", "
      		+ " \"certificateId\":\"62765\",\"certificateName\":\"certificatename.t-mobile.com\", "
      		+ " \"certificateStatus\":\"Active\", \"containerName\":\"VenafiBin_12345\", "
      		+ " \"createDate\":\"2020-06-24\", \"expiryDate\":\"2021-06-24\", "
      		+ " \"projectLeadEmailId\":\"project@email.com\"]}");
     
    when(ControllerUtil.getReqProcessor().process(GET_CERT_DETAIL, GET_CERT_DETAIL_VAL +certificatePath+"\"}",userDetails.getClientToken())).thenReturn(responseObj);
    String certType = "internal";
    SSLCertificateMetadataDetails certificateMetadata = getSSLCertificateMetadataDetails();
    SSLCertificateMetadataDetails certificateMetadataObj = certificateUtils.getCertificateMetaData(userDetails.getClientToken(),CERT_NAME,certType);
    assertEquals(certificateMetadataObj.getCertificateName(), certificateMetadata.getCertificateName());
}