@Test public void shouldFetchVersionLabelAndLockInfo() throws Exception { client.setResponse("application/json+nxentity", HttpResponses.DOC_LOCK_AND_VERSIONNED); Session session = client.getSession("Administrator", "Administrator"); Document file = (Document) session.newRequest("Document.Fetch").set("value", "/default-domain").execute(); assertEquals("8243123c-34d0-4e33-b4b3-290cef008db0", file.getId()); assertEquals(6, file.getFacets().size()); assertEquals("Downloadable", file.getFacets().getString(0)); assertEquals("Commentable", file.getFacets().getString(1)); assertEquals("Asset", file.getFacets().getString(2)); assertEquals("Versionable", file.getFacets().getString(3)); assertEquals("Publishable", file.getFacets().getString(4)); assertEquals("HasRelatedText", file.getFacets().getString(5)); assertEquals("Administrator:2013-05-16T17:58:26.618+02:00", file.getLock()); assertEquals("2013-05-16T17:58:26.618+02:00", file.getLockCreated().toString()); assertEquals(true, file.isLocked()); assertEquals("Administrator", file.getLockOwner()); assertEquals("/default-domain/UserWorkspaces/Administrator/My File", file.getPath()); assertEquals("1.1", file.getVersionLabel()); assertFalse(file.isCheckedOut()); assertEquals("File", file.getType()); assertEquals("My File", file.getTitle()); assertEquals("project", file.getState()); assertEquals("default", file.getRepository()); client.shutdown(); }