private <T extends AbstractComponent> void testComponent(Class<T> javaClass) {
Bean<?> bean = getUniqueBean(javaClass);
@SuppressWarnings("unchecked")
T reference = (T) getCurrentManager().getReference(bean, javaClass, getCurrentManager().createCreationalContext(bean));
AlterableContext context = (AlterableContext) getCurrentManager().getContext(bean.getScope());
for (String string : VALUES) {
assertNull(reference.getValue());
reference.setValue(string);
assertEquals(reference.getValue(), string);
AbstractComponent.reset();
context.destroy(bean);
assertTrue(AbstractComponent.isDestroyed());
assertNull(reference.getValue(), reference.getValue());
}
}