### Question:
UserStorage { public int add(User user) { return this.storage.add(user); } UserStorage(Storage storage); int add(User user); User findById(int id);  }### Answer:
@Test public void add() { Storage memory = new MemoryStorage(); UserStorage storage = new UserStorage(memory); storage.add(new User()); }
@Test public void whenLoadContextShouldGetUserStorageBean() { UserStorage memory = this.context.getBean("storage", UserStorage.class); memory.add(new User()); assertNotNull(memory); }
@Test public void whenLoadContextShouldGetJdbcStorageBean() { UserStorage memory = this.context.getBean("jdbcStorage", UserStorage.class); memory.add(new User()); assertNotNull(memory); }