BiPlatformRepositoryClientNavigationService implements INavigationService { public List<CmisObject> getDescendants( String repositoryId, String folderId, TypesOfFileableObjects type, int depth, String filter, boolean includeAllowableActions, boolean includeRelationships ) throws InvalidArgumentException, ConstraintViolationException, FilterNotValidException, RuntimeException, UpdateConflictException, ObjectNotFoundException, OperationNotSupportedException, PermissionDeniedException, FolderNotValidException { Collection filters = null; if ( !StringUtil.isEmpty( filter ) ) { filters = getFilterCollection( filter ); } if ( !repositoryId.equals( BiPlatformRepositoryClient.PLATFORMORIG ) ) { throw new InvalidArgumentException(); } List<CmisObject> objects = new ArrayList<CmisObject>(); Element objectElement = getFolderElement( folderId ); addChildren( objects, objectElement, type, filters, 0, 0, depth, 1 ); return objects; }  Document getDoc(); void setDoc( Document doc ); List<CmisObject> getObjectParent( String repositoryId, String objectId, String filter,
      boolean includeAllowableActions, boolean includeRelationships ); List<CmisObject> getFolderParent( String repositoryId, String folderId, String filter,
      boolean includeAllowableActions, boolean includeRelationships, boolean returnToRoot ); List<CmisObject> getDescendants( String repositoryId, String folderId, TypesOfFileableObjects type, int depth,
      String filter, boolean includeAllowableActions, boolean includeRelationships ); List<CmisObject> getChildren( String repositoryId, String folderId, TypesOfFileableObjects type,
      String filter, boolean includeAllowableActions, boolean includeRelationships, int maxItems, int skipCount ); GetCheckedoutDocsResponse getCheckedoutDocs( String repositoryId, String folderId, String filter,
      boolean includeAllowableActions, boolean includeRelationships, int maxItems, int skipCount ); String getRepositoryPath( CmisObject object ); String getRepositoryFilename( CmisObject object );  }
@Test public void testGetDescendants() { mLog.info( "testGetDescendants.." ); try { navService.getDescendants( "WRONG_REPOSITORY_ID", "/admin", null, 0, "filter", false, false ); } catch ( Exception exe ) { assertTrue( exe instanceof InvalidArgumentException ); } try { navService.getDescendants( BiPlatformRepositoryClient.PLATFORMORIG, "/admin", null, 0, "filter", false, false ); } catch ( Exception exe ) { assertTrue( "Shouldn have thrown exception here", true ); } try { navService.setDoc( mockDocument ); navService.getDescendants( BiPlatformRepositoryClient.PLATFORMORIG, "/admin", null, 0, "filter", false, false ); } catch ( Exception exe ) { assertTrue( exe instanceof FolderNotValidException ); } try { navService.setDoc( document ); cmisObjects = navService.getDescendants( BiPlatformRepositoryClient.PLATFORMORIG, "/admin", null, 0, "filter", false, false ); assertTrue( cmisObjects != null ); } catch ( Exception exe ) { assertTrue( "Shouldn't throw exception here", false ); mLog.error( "Exception in testGetDescendants() - Fails Unit Test" ); } TypesOfFileableObjects fileableFolders = new TypesOfFileableObjects( TypesOfFileableObjects.FOLDERS ); cmisObject.getProperties().getProperties().add( new PropertyString( PropertiesBase.OBJECTTYPEID, CmisObject.OBJECT_TYPE_FOLDER ) ); try { navService.setDoc( document ); cmisObjects = navService.getDescendants( BiPlatformRepositoryClient.PLATFORMORIG, "/admin", fileableFolders, 1, "filter", false, false ); assertTrue( cmisObjects != null ); } catch ( Exception exe ) { assertTrue( "Shouldn't throw exception here", false ); mLog.error( "Exception in testGetDescendants() - Fails Unit Test" ); } TypesOfFileableObjects fileableDocuments = new TypesOfFileableObjects( TypesOfFileableObjects.DOCUMENTS ); try { navService.setDoc( document ); cmisObjects = navService.getDescendants( BiPlatformRepositoryClient.PLATFORMORIG, "/admin", fileableDocuments, 0, "filter", false, false ); assertTrue( cmisObjects != null ); } catch ( Exception exe ) { assertTrue( "Shouldn't throw exception here", false ); mLog.error( "Exception in testGetDescendants() - Fails Unit Test" ); } }