### Question:
FileServerDepositHandler extends AbstractDepositHandler { @Override public PID doDeposit(PID destination, DepositData deposit) throws DepositException { log.debug("Preparing to perform a deposit from file server of type {} to {}", deposit.getPackagingType(), destination.getQualifiedId()); PID depositPID = pidMinter.mintDepositRecordPid(); registerDeposit(depositPID, destination, deposit, null); return depositPID; }  @Override PID doDeposit(PID destination, DepositData deposit);  }### Answer:
@Test public void testDepositBagPackage() throws Exception { DepositData deposit = new DepositData(sourcePath.toUri(), null, BAGIT, DEPOSIT_METHOD, depositingAgent); deposit.setDepositorEmail(DEPOSITOR_EMAIL); depositHandler.doDeposit(destPid, deposit); verify(depositStatusFactory).save(eq(depositPid.getId()), statusCaptor.capture()); Map<String, String> status = statusCaptor.getValue(); verifyDepositFields(depositPid, BAGIT, status); }
@Test public void testDepositDirectory() throws Exception { DepositData deposit = new DepositData(sourcePath.toUri(), null, DIRECTORY, DEPOSIT_METHOD, depositingAgent); deposit.setDepositorEmail(DEPOSITOR_EMAIL); depositHandler.doDeposit(destPid, deposit); verify(depositStatusFactory).save(eq(depositPid.getId()), statusCaptor.capture()); Map<String, String> status = statusCaptor.getValue(); verifyDepositFields(depositPid, DIRECTORY, status); }