class CVCController {

  @GetMapping(value = "/download", produces = MediaType.APPLICATION_OCTET_STREAM_VALUE)
  public ResponseEntity<byte[]> downloadMetadata() throws MetadataDownloadException
  {
    byte[] metadataArray = metadataService.getMetadata();
    if (metadataArray.length != 0)
    {
      return ResponseEntity.ok()
                           .header("Content-Disposition", "attachment; filename=Metadata.xml")
                           .contentType(MediaType.APPLICATION_OCTET_STREAM)
                           .body(metadataArray);
    }
    log.error("No Metadata were created. Can not download metadata.");
    throw new MetadataDownloadException();
  }

  public  CVCController(PermissionDataHandlingMBean data,
                       MetadataService metadataService,
                       CvcTlsCheck cvcTlsCheck);

}