when(folderMsgs.getResponseCode()).thenReturn(ResponseCodeType.NO_ERROR);
FindFolderParentType parent = mock(FindFolderParentType.class);
when(parent.isSetFolders()).thenReturn(true);
ArrayOfFoldersType folders = mock(ArrayOfFoldersType.class);
FolderType folderOne = mock(FolderType.class);
FolderIdType folderOneId = mock(FolderIdType.class);
when(folderOne.isSetFolderId()).thenReturn(true);
when(folderOneId.getId()).thenReturn("FOLDER-ONE-ID");
when(folderOne.getFolderId()).thenReturn(folderOneId);
FolderType folderTwo = mock(FolderType.class);
FolderIdType folderTwoId = mock(FolderIdType.class);
when(folderTwo.isSetFolderId()).thenReturn(true);
when(folderTwoId.getId()).thenReturn("FOLDER-TWO-ID");
when(folderTwo.getFolderId()).thenReturn(folderTwoId);
FolderType folderThree = mock(FolderType.class);
FolderIdType folderThreeId = mock(FolderIdType.class);
when(folderThree.isSetFolderId()).thenReturn(true);
when(folderThreeId.getId()).thenReturn("FOLDER-THREE-ID");
when(folderThree.getFolderId()).thenReturn(folderThreeId);
when(folders.getFolderArray()).thenReturn(new FolderType[]{folderOne, folderTwo, folderThree});
when(parent.getFolders()).thenReturn(folders);
when(folderMsgs.getRootFolder()).thenReturn(parent);
when(folderMsgs.isSetRootFolder()).thenReturn(true);