public static void assertNullTransformation(
      Transformations<Transformation> transformations, String name) {

    assertEquals(
        "the null Transformation should be returned for the name " + name,
        NULL_TRANSFORMATION,
        transformations.get(name));
  }
  public static void assertNullTransformation(
      Transformations<Transformation> transformations, int index) {

    assertEquals(
        "the null Transformation should be returned for the index " + index,
        NULL_TRANSFORMATION,
        transformations.get(index));
  }
  @DELETE
  @Path("/{name}/{version}")
  @ApiOperation(
      value = "Documents by name and version",
      notes = "Documents always have a name and a version",
      response = DocumentDTO.class)
  public DocumentDTO deleteDocument(
      @ApiParam(value = "Name of document", required = true) @PathParam("name") String name,
      @ApiParam(value = "Version of document", required = true) @PathParam("version")
          String version) {

    Document document = new Document(name, version);
    documentRepository.deleteDocument(document);
    return Transformations.convertDocumentToDTO(document);
  }
  @PUT
  @Path("/{name}/{version}")
  @Consumes(MediaType.MULTIPART_FORM_DATA)
  @ApiOperation(
      value = "Documentats by name and version",
      notes = "Documents always have a name and a version",
      response = DocumentDTO.class)
  public Response createDocument(
      @ApiParam(value = "Name of document", required = true) @PathParam("name") String name,
      @ApiParam(value = "Version of document", required = true) @PathParam("version")
          String version,
      @ApiParam(value = "DocSet tgz archive", required = true) @FormDataParam("file")
          InputStream uploadedInputStream,
      @FormDataParam("file") FormDataContentDisposition fileDetail) {

    String archivePath = String.format("%s/%s_%s.tgz", uploadDirectory, name, version);
    writeToFile(uploadedInputStream, archivePath);
    Document document = new Document(name, version);
    documentationService.installDocumentFromDocSetArchive(document, archivePath);
    return Response.status(Response.Status.OK)
        .entity(Transformations.convertDocumentToDTO(document))
        .build();
  }