try{
Class<?> providerClass = Class.forName(mockProvider);
if(!ComponentConfigProvider.class.isAssignableFrom(providerClass)){
throw new InvalidDefinitionException("Class specified as configProvider should implement ComponentConfigProvider", getLocation());
}
ComponentConfigProvider provider = (ComponentConfigProvider)providerClass.newInstance();
config = provider.provide();
}catch(ClassNotFoundException e){
throw new InvalidDefinitionException("Could not locate class specified as configProvider:"+configProvider, getLocation());
}catch(IllegalAccessException e){
throw new InvalidDefinitionException("Constructor is inaccessible for "+ configProvider, getLocation());
}catch (InstantiationException ie) {