public NestedBeanInstanceFactory(Class key) throws BeanRunnerNewInstanceException {
super();
try {
setValue(key.newInstance());
} catch (IllegalAccessException ex) {
throw new BeanRunnerNewInstanceException(
"Unable to create an instance of "
+ key.getName()
+ " try using BeanRunner.addTestValue() to create a concrete instance of this type",
ex);
} catch (InstantiationException ex) {
throw new BeanRunnerNewInstanceException(
"Unable to create an instance of "
+ key.getName()
+ " try using BeanRunner.addTestValue() to create a concrete instance of this type",
ex);
}