### Question:
FileResource { @DELETE @Path("/{fileId}") public Response deleteFile(@PathParam("fileId") String fileId) { fileService.deleteFile(fileId); return Response.ok().build(); } @Inject  FileResource(FileService fileService); @GET @Produces(MediaType.APPLICATION_JSON) Collection<FileInfo> listFiles(); @POST @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) FileInfo createFile(@FormDataParam("file") byte[] fileContent,
            @FormDataParam("file") FormDataContentDisposition fileDetail,
            @HeaderParam("Content-type") String contentType); @GET @Path("/{fileId}") @Produces(MediaType.APPLICATION_JSON) FileInfo getFile(@PathParam("fileId") String fileId); @PUT @Path("/{fileId}") @Consumes(MediaType.APPLICATION_JSON) Response updateFile(@PathParam("fileId") String fileId, FileInfo fileInfo); @DELETE @Path("/{fileId}") Response deleteFile(@PathParam("fileId") String fileId); @GET @Path("/{fileId}/content") Response getFileContent(@PathParam("fileId") String fileId); @POST @Path("/{fileId}/content") @Consumes(MediaType.MULTIPART_FORM_DATA) @Produces(MediaType.APPLICATION_JSON) FileInfo updateFileContent(@PathParam("fileId") String fileId,
            @FormDataParam("file") byte[] fileContent,
            @FormDataParam("file") FormDataContentDisposition fileDetail,
            @HeaderParam("Content-type") String contentType);  }### Answer:
@Test public void deleteFileInfo() { final String requestFileInfoId = "FILE_TO_DELETE"; doAnswer(new Answer<Void>() { @Override public Void answer(InvocationOnMock invocation) throws Throwable { String argFileInfoId = (String) invocation.getArguments()[0]; assertEquals("Service upload ID should match the requested upload ID", argFileInfoId, requestFileInfoId); return null; } }).when(fileServiceMock).deleteFile(anyString()); ClientResponse clientResponse = resource().path("/api/files/" + requestFileInfoId) .delete(ClientResponse.class); assertEquals("Response HTTP status code should be 200 (OK)", clientResponse.getStatus(), 200); verify(fileServiceMock).deleteFile(anyString()); }