### Question:
FolderObject extends ContentContainerObject { public FolderObject addFolder() { return addFolder(null); } protected  FolderObject(PID pid, RepositoryObjectDriver driver,
            RepositoryObjectFactory repoObjFactory); @Override FolderObject validateType(); @Override ContentContainerObject addMember(ContentObject member); FolderObject addFolder(); FolderObject addFolder(Model model); WorkObject addWork(); WorkObject addWork(Model model);  }### Answer:
@Test public void addFolderTest() { FolderObject childFolder = new FolderObject(childPid, driver, repoObjFactory); when(repoObjFactory.createFolderObject(any(Model.class))) .thenReturn(childFolder); folder.addFolder(); verify(repoObjFactory).createFolderObject((Model) isNull()); ArgumentCaptor<ContentObject> captor = ArgumentCaptor.forClass(ContentObject.class); verify(repoObjFactory).addMember(eq(folder), captor.capture()); ContentObject child = captor.getValue(); assertTrue("Incorrect type of child added", child instanceof FolderObject); assertEquals("Child did not have the expected pid", childPid, child.getPid()); }