@Test void testError() { when(mockEvent.getIdentifier()).thenAnswer(inv -> { sneakyJsonException(); return rdf.createIRI("info:event/12456"); }); assertThrows(TrellisRuntimeException.class, () -> svc.serialize(mockEvent)); }
@Override public String serialize(final Event event) { try { return MAPPER.writeValueAsString(ActivityStreamMessage.from(event)); } catch (final JsonProcessingException ex) { throw new TrellisRuntimeException("Error serializing event", ex); } }
DefaultEventSerializationService implements EventSerializationService { @Override public String serialize(final Event event) { try { return MAPPER.writeValueAsString(ActivityStreamMessage.from(event)); } catch (final JsonProcessingException ex) { throw new TrellisRuntimeException("Error serializing event", ex); } } }
DefaultEventSerializationService implements EventSerializationService { @Override public String serialize(final Event event) { try { return MAPPER.writeValueAsString(ActivityStreamMessage.from(event)); } catch (final JsonProcessingException ex) { throw new TrellisRuntimeException("Error serializing event", ex); } }  }
DefaultEventSerializationService implements EventSerializationService { @Override public String serialize(final Event event) { try { return MAPPER.writeValueAsString(ActivityStreamMessage.from(event)); } catch (final JsonProcessingException ex) { throw new TrellisRuntimeException("Error serializing event", ex); } }  @Override String serialize(final Event event); }
DefaultEventSerializationService implements EventSerializationService { @Override public String serialize(final Event event) { try { return MAPPER.writeValueAsString(ActivityStreamMessage.from(event)); } catch (final JsonProcessingException ex) { throw new TrellisRuntimeException("Error serializing event", ex); } }  @Override String serialize(final Event event);  }