private void _verifyProperty(BeanDescription beanDesc, boolean verifyDesc, boolean verifyIndex) { assertNotNull(beanDesc); List<BeanPropertyDefinition> props = beanDesc.findProperties(); assertEquals(2, props.size()); for (BeanPropertyDefinition prop : props) { String name = prop.getName(); final PropertyMetadata md = prop.getMetadata(); if ("a".equals(name)) { assertFalse(md.isRequired()); assertNull(md.getRequired()); if (verifyDesc) { assertEquals(PropDescBean.A_DESC, md.getDescription()); } if (verifyIndex) { assertNull(md.getIndex()); } } else if ("b".equals(name)) { assertTrue(md.isRequired()); assertEquals(Boolean.TRUE, md.getRequired()); if (verifyDesc) { assertNull(md.getDescription()); } if (verifyIndex) { assertEquals(Integer.valueOf(PropDescBean.B_INDEX), md.getIndex()); } } else { fail("Unrecognized property '" + name + "'"); } } }