BoxFile extends BoxCollaborationItem { public static BoxFile createFromId(String fileId) { return createFromIdAndName(fileId, null); } BoxFile();  BoxFile(JsonObject object); static BoxFile createFromId(String fileId); static BoxFile createFromIdAndName(String fileId, String name); BoxFileVersion getFileVersion(); String getSha1(); String getVersionNumber(); String getExtension(); Boolean getIsPackage(); String getUploaderDisplayName(); @Override Date getContentCreatedAt(); @Override Long getSize(); @Override Date getContentModifiedAt(); @Override Long getCommentCount(); BoxIteratorRepresentations getRepresentations(); static final String TYPE; static final String FIELD_SHA1; static final String FIELD_VERSION_NUMBER; static final String FIELD_EXTENSION; static final String FIELD_IS_PACKAGE; static final String FIELD_COMMENT_COUNT; static final String FIELD_SIZE; static final String FIELD_UPLOADER_DISPLAY_NAME; static final String FIELD_CONTENT_CREATED_AT; static final String FIELD_CONTENT_MODIFIED_AT; static final String FIELD_FILE_VERSION; static final String FIELD_REPRESENTATIONS; static final String[] ALL_FIELDS; }
@Test public void testCreateFromId() { String expectedId = "5"; String expectedType = BoxFile.TYPE; BoxFile file = BoxFile.createFromId(expectedId); String id = file.getId(); String type = file.getType(); Assert.assertEquals(expectedId, id); Assert.assertEquals(expectedType, type); }