BoxSDKService { public BoxFileWithContent getFileContent(BoxFile file) throws BoxSDKServiceException { BoxFileWithContent boxFileWithContent = new BoxFileWithContent(); boxFileWithContent.setBoxFile(file); boxFileWithContent.setContent(getFileContent(file.getID())); return boxFileWithContent; }  BoxSDKServiceConfig getBoxSDKServiceConfig(); BoxAPIConnection getBoxAPIConnection(); BoxFolder getRootFolder(); BoxFolder createSharedFolder(String folderName); BoxFolder createSharedFolder(String folderName, String parentId); BoxFolder createFolderUnderRoot(String folderName); BoxFolder createFolder(String folderName, String parentId); BoxFile uploadFile(String folderId, String filename, String filecontent); List<BoxFile> listFiles(String folderId); BoxFileWithContent getFileContent(BoxFile file); String getFileContent(String fileId); String getBoxEmbedWidgetIFrame(BoxFolder boxFolder); BoxFolder getFolderWithName(String folderName); BoxFolder getFolderWithNameAndParentFolderId(String folderName, String parentFolderId); void deleteFolderAndItsContent(String folderId); void deleteFolderContentOlderThan(String folderId, DateTime olderThan); void addCommentToFile(String fileId, String comment);  }
@Test @Category(BoxSDKTest.class) public void testGetFileContent() throws Exception { BoxFolder createdFolder = boxSDKService.createFolder("testGetFileContent-" + new Date().getTime(), testFolder.getID()); String fileContentStr = "content of file1.txt"; BoxFile createdFile = boxSDKService.uploadFile(createdFolder.getID(), "file1.txt", fileContentStr); BoxFileWithContent fileContent = boxSDKService.getFileContent(createdFile); assertEquals(fileContentStr, fileContent.getContent()); assertEquals(createdFile, fileContent.getBoxFile()); }