}
try {
return (IMockitoConfiguration) configClass.newInstance();
} catch (ClassCastException e) {
throw new MockitoConfigurationException("\n" +
"MockitoConfiguration class must implement org.mockito.configuration.IMockitoConfiguration interface.", e);
} catch (Exception e) {
throw new MockitoConfigurationException("\n" +
"Unable to instantianate org.mockito.configuration.MockitoConfiguration class. Does it have a safe, no-arg constructor?", e);
}
}