List<MailContainerWithRecipient> notifications = Lists.newArrayList();
UploadRequest r = service.findRequestByUuid(getSystemAccount(), null, identifier);
Context context = new UploadRequestBatchResultContext(r);
if (!r.isNotified()) {
for (UploadRequestUrl u : r.getUploadRequestURLs()) {
<BUG>notifications.add(mailBuildingService.buildUploadRequestBeforeExpiryWarnRecipient((User) r.getOwner(), u));
}
notifications.add(mailBuildingService.buildUploadRequestBeforeExpiryWarnOwner((User) r.getOwner(), r));
r.setNotified(true);</BUG>
service.updateRequest(getSystemAccount(), r.getOwner(), r);

List<MailContainerWithRecipient> notifications = Lists.newArrayList();
UploadRequest r = service.findRequestByUuid(getSystemAccount(), null, identifier);
Context context = new UploadRequestBatchResultContext(r);
if (!r.isNotified()) {
for (UploadRequestUrl u : r.getUploadRequestURLs()) {
EmailContext ctx = new UploadRequestWarnBeforeExpiryEmailContext((User)r.getOwner(), r, u, false);
notifications.add(mailBuildingService.build(ctx));
}
EmailContext ctx = new UploadRequestWarnBeforeExpiryEmailContext((User)r.getOwner(), r, null, true);
notifications.add(mailBuildingService.build(ctx));
r.setNotified(true);
service.updateRequest(getSystemAccount(), r.getOwner(), r);
