BeanDocument b = getBeans(bean);
assertNotNull("The bean should'nt be null", b);
long begin = System.currentTimeMillis();
long end = System.currentTimeMillis();
BasicBean beanRec = b.getBean();
while (beanRec == null && (end - begin) < getTimeout()) {
beanRec = b.getBean();
end = System.currentTimeMillis();
sleep(50);
}