### Question:
FastDFSRepository { public String uploadFile(File file, String fileName, long fileLength) { try { String fileExtName = null; if (fileName.contains(".")) { fileExtName = fileName.substring(fileName.lastIndexOf(".") + 1); } FastDFSClient client = fastDFSPool.getClient(); System.out.println(client); NameValuePair[] metaList = new NameValuePair[3]; metaList[0] = new NameValuePair("fileName", fileName); metaList[1] = new NameValuePair("fileExtName", fileExtName); metaList[2] = new NameValuePair("fileLength", String.valueOf(fileLength)); String path = client.upload_file1(FileUtils.getFileByte(file), fileExtName, metaList); client.close(); return path; } catch (IOException e) { e.printStackTrace(); } catch (MyException e) { e.printStackTrace(); } return null; }  String uploadFile(File file, String fileName, long fileLength); byte[] downloadFile(String fileId); FileInfo getFileInfo(String fileId); Map<String, String> getFileMetadata(String fileId); int deleteFile(String fileId);  }### Answer:
@Test public void testUploadFile() { File file = new File("E: String path = fastDFSRepository.uploadFile(file, file.getName(), file.length()); System.out.println(path); }