protected Injector createInjector() throws Exception {
		// Extract the modules classes
		WithModules wm = this.getTestClass().getJavaClass()
				.getAnnotation(WithModules.class);
		Class<? extends Module>[] moduleClasses = wm.value();

		// Instantiate the modules
		Module[] modules = new Module[moduleClasses.length];
		for (int i = 0; i < moduleClasses.length; i++) {
			if (moduleClasses[i] == null) {
				throw new Exception(
						"A module class within the @WithModules annotation cannot be null.");
			}
			try {
				modules[i] = moduleClasses[i].newInstance();
			} catch (Exception e) {
				throw new Exception(
						"The module "
								+ moduleClasses[i]
								+ " is required by the test and cannot be instantiated.",
						e);
			}
		}

		// Return the injector
		return Guice.createInjector(modules);
	}