@Test public void deletionFailure() { BeekeeperEvent beekeeperEvent = new BeekeeperEvent(housekeepingEntities, messageEvent); doThrow(AmazonClientException.class).when(delegate).delete(beekeeperEvent.getMessageEvent()); messageReaderAdapter.delete(beekeeperEvent); verify(delegate).delete(beekeeperEvent.getMessageEvent()); }
@Override public void delete(BeekeeperEvent beekeeperEvent) { try { delegate.delete(beekeeperEvent.getMessageEvent()); log.debug("Message deleted successfully"); } catch (Exception e) { log.error("Could not delete message from queue: ", e); } }
MessageReaderAdapter implements BeekeeperEventReader { @Override public void delete(BeekeeperEvent beekeeperEvent) { try { delegate.delete(beekeeperEvent.getMessageEvent()); log.debug("Message deleted successfully"); } catch (Exception e) { log.error("Could not delete message from queue: ", e); } } }
MessageReaderAdapter implements BeekeeperEventReader { @Override public void delete(BeekeeperEvent beekeeperEvent) { try { delegate.delete(beekeeperEvent.getMessageEvent()); log.debug("Message deleted successfully"); } catch (Exception e) { log.error("Could not delete message from queue: ", e); } } MessageReaderAdapter(MessageReader delegate,
      List<MessageEventHandler> handlers); }
MessageReaderAdapter implements BeekeeperEventReader { @Override public void delete(BeekeeperEvent beekeeperEvent) { try { delegate.delete(beekeeperEvent.getMessageEvent()); log.debug("Message deleted successfully"); } catch (Exception e) { log.error("Could not delete message from queue: ", e); } } MessageReaderAdapter(MessageReader delegate,
      List<MessageEventHandler> handlers); @Override Optional<BeekeeperEvent> read(); @Override void delete(BeekeeperEvent beekeeperEvent); @Override void close(); }
MessageReaderAdapter implements BeekeeperEventReader { @Override public void delete(BeekeeperEvent beekeeperEvent) { try { delegate.delete(beekeeperEvent.getMessageEvent()); log.debug("Message deleted successfully"); } catch (Exception e) { log.error("Could not delete message from queue: ", e); } } MessageReaderAdapter(MessageReader delegate,
      List<MessageEventHandler> handlers); @Override Optional<BeekeeperEvent> read(); @Override void delete(BeekeeperEvent beekeeperEvent); @Override void close();  }