@Test public void testId() { Context first = Context.create(); Context second = Context.create(); Context third = Context.create(first); Context fourth = Context.create(second); Context fifth = Context.create(fourth); assertThat(first.id(), not(second.id())); assertThat(first.id(), not(third.id())); assertThat(first.id(), not(fourth.id())); assertThat(first.id(), not(fifth.id())); assertThat(second.id(), not(third.id())); assertThat(second.id(), not(fourth.id())); assertThat(second.id(), not(fifth.id())); assertThat(third.id(), not(fourth.id())); assertThat(third.id(), not(fifth.id())); assertThat(fourth.id(), not(fifth.id())); }
@Override public String id() { return contextId; }
ListContext implements Context { @Override public String id() { return contextId; } }
ListContext implements Context { @Override public String id() { return contextId; } ListContext(Builder builder); }
ListContext implements Context { @Override public String id() { return contextId; } ListContext(Builder builder); @Override String id(); @Override void register(T instance); @Override void supply(Class<T> type, Supplier<T> supplier); @Override Optional<T> get(Class<T> type); @Override void register(Object classifier, T instance); @Override void supply(Object classifier, Class<T> type, Supplier<T> supplier); @Override Optional<T> get(Object classifier, Class<T> type); }
ListContext implements Context { @Override public String id() { return contextId; } ListContext(Builder builder); @Override String id(); @Override void register(T instance); @Override void supply(Class<T> type, Supplier<T> supplier); @Override Optional<T> get(Class<T> type); @Override void register(Object classifier, T instance); @Override void supply(Object classifier, Class<T> type, Supplier<T> supplier); @Override Optional<T> get(Object classifier, Class<T> type);  }