@Test public void testRecordEventWithNullBucketExperiment() throws Exception { when(event.getName()).thenReturn(null); when(event.getType()).thenReturn(Event.Type.IMPRESSION); when(assignment.getUserID()).thenReturn(null); when(assignment.getBucketLabel()).thenReturn(null); when(assignment.getExperimentID()).thenReturn(null); eventsEnvelope.run(); verify(transaction, times(0)).insert(any(String.class), any(String.class), any(Experiment.ID.class), any(Bucket.Label.class), any(String.class), any(Context.class), any(Date.class)); }
@Override public void run() { try { recordEvent(assignment, event); } catch (Exception e) { if (e instanceof WasabiClientException) { logger.warn("unable to process event, cause: {}, message: {}", e.getCause(), ((WasabiClientException) e).getDetailMessage()); } } }
EventsEnvelope implements Runnable { @Override public void run() { try { recordEvent(assignment, event); } catch (Exception e) { if (e instanceof WasabiClientException) { logger.warn("unable to process event, cause: {}, message: {}", e.getCause(), ((WasabiClientException) e).getDetailMessage()); } } } }
EventsEnvelope implements Runnable { @Override public void run() { try { recordEvent(assignment, event); } catch (Exception e) { if (e instanceof WasabiClientException) { logger.warn("unable to process event, cause: {}, message: {}", e.getCause(), ((WasabiClientException) e).getDetailMessage()); } } } EventsEnvelope(final Assignment assignment, final Event event, final Transaction transaction); }
EventsEnvelope implements Runnable { @Override public void run() { try { recordEvent(assignment, event); } catch (Exception e) { if (e instanceof WasabiClientException) { logger.warn("unable to process event, cause: {}, message: {}", e.getCause(), ((WasabiClientException) e).getDetailMessage()); } } } EventsEnvelope(final Assignment assignment, final Event event, final Transaction transaction); @Override void run(); }
EventsEnvelope implements Runnable { @Override public void run() { try { recordEvent(assignment, event); } catch (Exception e) { if (e instanceof WasabiClientException) { logger.warn("unable to process event, cause: {}, message: {}", e.getCause(), ((WasabiClientException) e).getDetailMessage()); } } } EventsEnvelope(final Assignment assignment, final Event event, final Transaction transaction); @Override void run();  }