@Test void testNoopEventSerializationService() { final Event event = mock(Event.class); when(event.getTypes()).thenReturn(emptyList()); when(event.getIdentifier()).thenReturn(rdf.createIRI(identifier)); final EventSerializationService svc = new NoopEventSerializationService(); assertEquals("{\n \"@context\": \"https: " \"id\": \"" + identifier + "\"\n}", svc.serialize(event)); }
@Override public String serialize(final Event event) { return "{" + "\n \"@context\": \"https: ",\n \"id\": \"" + event.getIdentifier().getIRIString() + "\"" + getTypesAsJsonFragment(event) + event.getObject().map(obj -> ",\n \"object\": \"" + obj.getIRIString() + "\"").orElse("") + "\n}"; }
NoopEventSerializationService implements EventSerializationService { @Override public String serialize(final Event event) { return "{" + "\n \"@context\": \"https: ",\n \"id\": \"" + event.getIdentifier().getIRIString() + "\"" + getTypesAsJsonFragment(event) + event.getObject().map(obj -> ",\n \"object\": \"" + obj.getIRIString() + "\"").orElse("") + "\n}"; } }
NoopEventSerializationService implements EventSerializationService { @Override public String serialize(final Event event) { return "{" + "\n \"@context\": \"https: ",\n \"id\": \"" + event.getIdentifier().getIRIString() + "\"" + getTypesAsJsonFragment(event) + event.getObject().map(obj -> ",\n \"object\": \"" + obj.getIRIString() + "\"").orElse("") + "\n}"; }  }
NoopEventSerializationService implements EventSerializationService { @Override public String serialize(final Event event) { return "{" + "\n \"@context\": \"https: ",\n \"id\": \"" + event.getIdentifier().getIRIString() + "\"" + getTypesAsJsonFragment(event) + event.getObject().map(obj -> ",\n \"object\": \"" + obj.getIRIString() + "\"").orElse("") + "\n}"; }  @Override String serialize(final Event event); }
NoopEventSerializationService implements EventSerializationService { @Override public String serialize(final Event event) { return "{" + "\n \"@context\": \"https: ",\n \"id\": \"" + event.getIdentifier().getIRIString() + "\"" + getTypesAsJsonFragment(event) + event.getObject().map(obj -> ",\n \"object\": \"" + obj.getIRIString() + "\"").orElse("") + "\n}"; }  @Override String serialize(final Event event);  }