return (T) testInstance;
}
@SuppressWarnings("unchecked")
private <T extends MByHaveSpec> List<Module> getUserModules(final Class<T> testClass) {
final GuiceInjection guiceAnnotation = testClass.getAnnotation(GuiceInjection.class);
final Class<? extends Module>[] userModuleClasses = guiceAnnotation == null ? null : guiceAnnotation.value();
return Arrays.asList(userModuleClasses == null ? new Class[]{} : userModuleClasses).stream().map(userModuleClass -> {
try {
return (Module) userModuleClass.getConstructor().newInstance();
} catch (NoSuchMethodException | InvocationTargetException | IllegalAccessException | InstantiationException e) {