when(ec.lookupByTypeAndOwner(ExporterMetadata.TYPE_PER_USER, owner))
.thenReturn(metadata);
when(sc.listByOwner(owner)).thenReturn(new ArrayList<Subscription>());
thisOwnerResource.undoImports(owner.getKey(),
new UserPrincipal("JarJarBinks", null, true));
List<ImportRecord> records = importRecordCurator.findRecords(owner);
assertTrue(records.size() == 1);
ImportRecord ir = records.get(0);
assertTrue(ir.getStatus() == ImportRecord.Status.DELETE);
}