use of edu.unc.lib.boxc.deposit.normalize.VocabularyEnforcementJob in project box-c by UNC-Libraries.
the class VocabularyEnforcementJobTest method setup.
@Before
public void setup() throws Exception {
job = new VocabularyEnforcementJob();
job.setDepositUUID(depositUUID);
job.setDepositDirectory(depositDir);
setField(job, "pidMinter", pidMinter);
setField(job, "depositsDirectory", depositsDirectory);
setField(job, "jobStatusFactory", jobStatusFactory);
setField(job, "depositStatusFactory", depositStatusFactory);
setField(job, "vocabManager", vocabManager);
setField(job, "depositModelManager", depositModelManager);
PID depositPid = pidMinter.mintContentPid();
depositStatus = new HashMap<>();
depositStatus.put(DepositField.containerId.name(), depositPid.toString());
when(depositStatusFactory.get(anyString())).thenReturn(depositStatus);
Model model = job.getWritableModel();
Bag depositBag = model.createBag(job.getDepositPID().getURI());
rescPid = pidMinter.mintContentPid();
Resource mainResource = model.createResource(rescPid.getURI());
depositBag.add(mainResource);
job.closeModel();
}