@Test
public void test_downloadCertificate() throws Exception {

    InputStreamResource resource = null;
    ResponseEntity<InputStreamResource> responseEntityExpected = ResponseEntity.status(HttpStatus.OK).body(resource);
    when(sslCertificateService.downloadCertificate(eq("5PDrOhsy4ig8L3EpsJZSLAMg"), Mockito.any(), eq("12345"),
            eq("pem"),eq("external"))).thenReturn(responseEntityExpected);
    mockMvc.perform(MockMvcRequestBuilders.get("/v2/sslcert/certificates/12345/pem/external")
            .header("vault-token", "5PDrOhsy4ig8L3EpsJZSLAMg")
            .header("Content-Type", "application/json;charset=UTF-8"))
            .andExpect(status().isOk());
}