} catch (InvalidConfigurationException expected) {
}
}
{
final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(attributeName);
GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, dynamicAttributeInfo, null);
assertFalse(attribute.isPersistent());
assertEquals(dynamicAttributeInfo.isPersistent(), attribute.isPersistent());
assertTrue(attribute.isReadable());
assertEquals(dynamicAttributeInfo.isReadable().booleanValue(), attribute.isReadable());
assertTrue(attribute.isWritable());
assertEquals(dynamicAttributeInfo.isWritable().booleanValue(), attribute.isWritable());
assertEquals(dynamicAttributeInfo.getName(), attribute.getName());
}
{
final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(attributeName, true);
GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, dynamicAttributeInfo, null);
assertTrue(attribute.isPersistent());
assertEquals(dynamicAttributeInfo.isPersistent(), attribute.isPersistent());
assertTrue(attribute.isReadable());
assertEquals(dynamicAttributeInfo.isReadable().booleanValue(), attribute.isReadable());
assertTrue(attribute.isWritable());
assertEquals(dynamicAttributeInfo.isWritable().booleanValue(), attribute.isWritable());
assertEquals(dynamicAttributeInfo.getName(), attribute.getName());
}
{
final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(attributeName, true, false,
true);
GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, dynamicAttributeInfo, null);
assertTrue(attribute.isPersistent());
assertEquals(dynamicAttributeInfo.isPersistent(), attribute.isPersistent());
assertFalse(attribute.isReadable());
assertEquals(dynamicAttributeInfo.isReadable().booleanValue(), attribute.isReadable());
assertTrue(attribute.isWritable());
assertEquals(dynamicAttributeInfo.isWritable().booleanValue(), attribute.isWritable());
assertEquals(dynamicAttributeInfo.getName(), attribute.getName());
}
{
final DynamicGAttributeInfo dynamicAttributeInfo = new DynamicGAttributeInfo(attributeName, true, false,
false);
GBeanMBeanAttribute attribute = new GBeanMBeanAttribute(gmbean, dynamicAttributeInfo, null);
assertTrue(attribute.isPersistent());
assertEquals(dynamicAttributeInfo.isPersistent(), attribute.isPersistent());
assertFalse(attribute.isReadable());
assertEquals(dynamicAttributeInfo.isReadable().booleanValue(), attribute.isReadable());
assertFalse(attribute.isWritable());
assertEquals(dynamicAttributeInfo.isWritable().booleanValue(), attribute.isWritable());
assertEquals(dynamicAttributeInfo.getName(), attribute.getName());
}
}