@Test public void givenEmptyModelWhenCreatedTaskThenModelHasTask() { InboxModel model = new InMemoryInboxModel(); List<Event> events = new ArrayList<>(); Identifier id = new Identifier(0); events.add(new CreatedEvent()); InteractionContext context = new InteractionContext("task", -1, new Date(), Collections.<String, String>emptyMap(), new Interaction(id, events)); model.apply(context); assertThat(model.getTasks().entrySet().size(), CoreMatchers.equalTo(1)); }
public abstract Map<Identifier, InboxTask> getTasks();
InboxModel implements InteractionContextSink { public abstract Map<Identifier, InboxTask> getTasks(); }
InboxModel implements InteractionContextSink { public abstract Map<Identifier, InboxTask> getTasks();  }
InboxModel implements InteractionContextSink { public abstract Map<Identifier, InboxTask> getTasks();  abstract Map<Identifier, InboxTask> getTasks(); }
InboxModel implements InteractionContextSink { public abstract Map<Identifier, InboxTask> getTasks();  abstract Map<Identifier, InboxTask> getTasks();  }