Object bean1 = new Object();
Object bean2 = new Object();
Object bean3 = new Object();
Object bean4 = new Object();
BeanId beanId1 = getBeanIdStore().register("bean1");
BeanContext BeanContext = getBeanContext();
Map<String, Object> beanMap = BeanContext.getBeanMap();
BeanContext.addBean(beanId1, bean1, null);
assertEquals(1, beanMap.size());
assertEquals(bean1, beanMap.get(beanId1.getName()));
beanMap.put("bean2", bean2);
BeanId beanId2 = BeanContext.getBeanId("bean2");
assertEquals(bean2, BeanContext.getBean(beanId2));
assertEquals(bean2, beanMap.get(beanId2.getName()));
assertTrue(beanMap.containsKey("bean2"));
assertFalse(beanMap.containsKey("x"));
assertTrue(beanMap.containsValue(bean1));