### Question:
ServiceRequestScopeImpl implements Scope { public <T> void seed(Key<T> key, T seed) { validateInScope(); if (seededClasses.get().containsKey(key)) { throw new IllegalStateException(String.format("A value for the key %s was already seeded in this scope.", key)); } seededClasses.get().put(key, seed); }  @Override Provider<T> scope(Key<T> key, Provider<T> unscoped); @Override String toString(); void seed(Key<T> key, T seed); boolean isInsideScope(); void enter(); void exit();  }### Answer:
@Test(expected = OutOfScopeException.class) public void testSeedNotEnteredScope() { scope.seed(key, seed); }
@Test(expected = IllegalStateException.class) public void testSeedObjectTwice() { executeInsideScope(() -> { scope.seed(key, seed); scope.seed(key, seed); }); }