### Question:
RemoteFSController extends AbstractController implements Initializable { private void createFolder(TreeItem<BoxObject> item) { if (item == null || !(item instanceof FolderTreeItem)) { return; } TextInputDialog dialog = new TextInputDialog(resourceBundle.getString("remoteFsName")); dialog.setHeaderText(null); dialog.setTitle(resourceBundle.getString("remoteFsCreateFolder")); dialog.setContentText(resourceBundle.getString("remoteFsFolderName")); Optional<String> result = dialog.showAndWait(); new Thread(() -> { result.ifPresent(name -> { FolderTreeItem lazyItem = (FolderTreeItem) item; try { createFolder(lazyItem.getPath().resolve(name)); } catch (QblStorageException e) { alert("Failed to create Folder", e); } }); }).start(); }  @Override void initialize(URL location, ResourceBundle resources); static final int OPTION_EDGE_SIZE; }### Answer:
@Test(timeout=10000L) public void testCalculateFolderStructure() throws Exception { nav.createFolder("folder"); nav.commit(); TreeItem rootNode = getRoot(); waitUntil(() -> rootNode.getChildren().size() == 1); }
@Test(timeout=10000L) public void testObserveFoldersSubfolder() throws Exception { BoxFolder folder = nav.createFolder("folder"); nav.commit(); BoxNavigation navFolder3 = nav.navigate(folder); navFolder3.createFolder("subFolder"); navFolder3.commit(); TreeItem rootNode = getRoot(); waitUntil(() -> rootNode.getChildren().size() == 1); TreeItem subnode = (TreeItem) rootNode.getChildren().get(0); waitUntil(() -> loadChildren((FolderTreeItem) subnode).size() == 1); }
@Test(timeout=10000L) public void testCreateFolder() throws Exception { File dir = new File(TEST_TMP_DIR); dir.mkdirs(); BoxFolder folder = createBoxFolder(dir); controller.createFolder(testFolder.resolve(dir.getName())); executeTransactions(); BoxNavigation newNav = nav.navigate(folder); assertThat(newNav.listFiles().size(), is(0)); assertThat(newNav.listFolders().size(), is(1)); }