FrontController extends AbstractAjaxController { Object getController(final String controllerName, final boolean isExternal) { Object controllerInstance = this.controllers.get(controllerName); if (controllerInstance == null) { final String packageName = CONTROLLER_PACKAGE; final StringBuilder className = new StringBuilder(packageName.length() + controllerName.length() + CONTROLLER_SUFFIX.length() + 1); className.append(packageName); className.append(PACKAGE_SEPARATOR); if (isExternal) { className.append(EXTERNAL_CONTROLLER_SUB_PACKAGE); className.append(PACKAGE_SEPARATOR); } className.append(Character.toUpperCase(controllerName.charAt(0))); className.append(controllerName.substring(1)); className.append(CONTROLLER_SUFFIX); try { final Class<?> controllerClass = Class.forName(className.toString()); controllerInstance = this.guiceInjector.getInstance(controllerClass); this.controllers.put(controllerName, controllerInstance); } catch (final ClassNotFoundException e) { throw new StepInternalException("Unable to find a controller for " + className, e); } } return controllerInstance; } @Inject  FrontController(final Injector guiceInjector,
                           final AppManagerService appManagerService,
                           final ClientErrorResolver errorResolver,
                           final Provider<ClientSession> clientSessionProvider,
                           final Provider<ObjectMapper> objectMapperProvider);  static final String UTF_8_ENCODING; }
@Test public void testGetController() { final String controllerName = "Bible"; final BibleController mockController = mock(BibleController.class); when(this.guiceInjector.getInstance(BibleController.class)).thenReturn(mockController); final Object controller = this.fcUnderTest.getController(controllerName, false); assertEquals(controller.getClass(), mockController.getClass()); }