s = s + "\nevents:{";
s = s + "\n fetch: 'org.nutz.ioc.json.pojo.WhenFetchAnimal',";
s = s + "\n create: 'org.nutz.ioc.json.pojo.WhenCreateAnimal',";
s = s + "\n depose: 'org.nutz.ioc.json.pojo.WhenDeposeAnimal'";
s = s + "\n}";
Ioc ioc = I(J("fox", s));
Animal f = ioc.get(Animal.class, "fox");
assertEquals(10, f.getCreateTime());
assertEquals(10, f.getFetchTime());
assertEquals(0, f.getDeposeTime());
ioc.get(Animal.class, "fox");
assertEquals(10, f.getCreateTime());
assertEquals(20, f.getFetchTime());
assertEquals(0, f.getDeposeTime());
ioc.reset();
assertEquals(10, f.getCreateTime());
assertEquals(20, f.getFetchTime());
assertEquals(10, f.getDeposeTime());
}