### Question:
DepositSubmissionService { public int submitDeposit(String depositorName, String depositorGroup, PID depositPid, PID destination) { AgentPrincipals principals = new AgentPrincipals(depositorName, new AccessGroupSet(depositorGroup)); DepositData depositData = new DepositData(null, null, BAG_WITH_N3, BXC3_TO_5_MIGRATION_UTIL.getLabel(), principals); depositData.setDepositorEmail(depositorName + EMAIL_SUFFIX); depositData.setOverrideTimestamps(true); PreconstructedDepositHandler depositHandler = new PreconstructedDepositHandler(depositPid); depositHandler.setDepositStatusFactory(depositStatusFactory); try { depositHandler.doDeposit(destination, depositData); } catch (DepositException e) { throw new RepositoryException("Failed to submit deposit", e); } return 0; } DepositSubmissionService(String redisHost, int redisPort); int submitDeposit(String depositorName, String depositorGroup, PID depositPid, PID destination); void setDepositStatusFactory(DepositStatusFactory depositStatusFactory);  }### Answer:
@Test public void submitDeposit() { PID depositPid = pidMinter.mintDepositRecordPid(); PID destinationPid = pidMinter.mintContentPid(); int result = service.submitDeposit(DEPOSITOR, DEPOSITOR_GROUPS, depositPid, destinationPid); assertEquals(0, result); verify(statusFactory).save(eq(depositPid.getId()), statusCaptor.capture()); Map<String, String> status = statusCaptor.getValue(); verifyDepositFields(depositPid, destinationPid, status); }