### Question:
FileEventStorage implements InteractionContextSink, Closeable { InteractionContext deserialize(String line) throws IOException { return mapper.readValue(line, InteractionContext.class); } FileEventStorage(ObjectMapper mapper); @Override void apply(InteractionContext interactionContext); void load(File file, EventStore eventStore); void save(File file, EventSource eventSource); @Override void close();  }### Answer:
@Test public void givenEventStringWhenDeserializeThenInteractionContextDeserialized() throws IOException { String json = "{\"type\":\"task\",\"version\":1,\"timestamp\":12345,\"id\":1," + "\"attributes\":{\"user\":\"rickard\"},\"events\":[{\"type\":\"com.github.rickardoberg.stuff.event" + ".ChangedDescriptionEvent\",\"description\":\"Hello World\"},{\"type\":\"com.github.rickardoberg" + ".stuff.event.ChangedDescriptionEvent\",\"description\":\"Hello World2\"}]}\n"; InteractionContext context = eventStorage.deserialize(json); Assert.assertThat(context, CoreMatchers.notNullValue()); }