@Test public void testShouldProcessItemWhenNull() throws SQLException { ExportEventProcessor exportEventProcessor = new ItemEventProcessor(context, request, null); boolean result = exportEventProcessor.shouldProcessItem(null); assertThat(result, is(false)); }
protected boolean shouldProcessItem(Item item) throws SQLException { if (item == null) { return false; } if (!item.isArchived()) { return false; } if (itemService.canEdit(context, item)) { return false; } if (!shouldProcessItemType(item)) { return false; } if (!shouldProcessEntityType(item)) { return false; } return true; }
ExportEventProcessor { protected boolean shouldProcessItem(Item item) throws SQLException { if (item == null) { return false; } if (!item.isArchived()) { return false; } if (itemService.canEdit(context, item)) { return false; } if (!shouldProcessItemType(item)) { return false; } if (!shouldProcessEntityType(item)) { return false; } return true; } }
ExportEventProcessor { protected boolean shouldProcessItem(Item item) throws SQLException { if (item == null) { return false; } if (!item.isArchived()) { return false; } if (itemService.canEdit(context, item)) { return false; } if (!shouldProcessItemType(item)) { return false; } if (!shouldProcessEntityType(item)) { return false; } return true; } ExportEventProcessor(Context context, HttpServletRequest request); }
ExportEventProcessor { protected boolean shouldProcessItem(Item item) throws SQLException { if (item == null) { return false; } if (!item.isArchived()) { return false; } if (itemService.canEdit(context, item)) { return false; } if (!shouldProcessItemType(item)) { return false; } if (!shouldProcessEntityType(item)) { return false; } return true; } ExportEventProcessor(Context context, HttpServletRequest request); abstract void processEvent(); }
ExportEventProcessor { protected boolean shouldProcessItem(Item item) throws SQLException { if (item == null) { return false; } if (!item.isArchived()) { return false; } if (itemService.canEdit(context, item)) { return false; } if (!shouldProcessItemType(item)) { return false; } if (!shouldProcessEntityType(item)) { return false; } return true; } ExportEventProcessor(Context context, HttpServletRequest request); abstract void processEvent();  }