@Test
public void whenAddUserInMemoryStorageShouldAssignId(){

    ApplicationContext context = new ClassPathXmlApplicationContext("spring-config-test.xml");
    ImportUser importUser = new ImportUser(context.getBean(MemoryDAO.class));
    User user = new User();
    user.setName("test");
    importUser.add(user);
    assertThat(1,is(user.getId()));
}