ComponentInstance ci = cf.createComponentInstance(props);
if (ci.isStarted()) {
fail("A lifecycle callback with a bad method must be rejected (instance stills valid)" + cf);
}
ci.dispose();
cf.stop();
} catch (ConfigurationException e) {
//The check does not happen in the configure method.
fail("Unexpected exception when creating an instance : " + e.getMessage());
} catch (UnacceptableConfiguration e) {
fail("Unexpected exception when creating an instance : " + e.getMessage());