@Test public void testAppControllerIndex() throws Exception { ApplicationHistoryManager ahManager = mock(ApplicationHistoryManager.class); Injector injector = WebAppTests.createMockInjector(ApplicationHistoryManager.class, ahManager); AHSController controller = injector.getInstance(AHSController.class); controller.index(); Assert .assertEquals("Application History", controller.get(TITLE, "unknown")); }
public static AHSWebApp getInstance() { if (instance == null) { instance = new AHSWebApp(); } return instance; }
AHSWebApp extends WebApp implements YarnWebParams { public static AHSWebApp getInstance() { if (instance == null) { instance = new AHSWebApp(); } return instance; } }
AHSWebApp extends WebApp implements YarnWebParams { public static AHSWebApp getInstance() { if (instance == null) { instance = new AHSWebApp(); } return instance; } private  AHSWebApp(); }
AHSWebApp extends WebApp implements YarnWebParams { public static AHSWebApp getInstance() { if (instance == null) { instance = new AHSWebApp(); } return instance; } private  AHSWebApp(); static AHSWebApp getInstance(); @Private @VisibleForTesting static void resetInstance(); ApplicationHistoryManager getApplicationHistoryManager(); void setApplicationHistoryManager(
      ApplicationHistoryManager applicationHistoryManager); TimelineDelegationTokenSecretManagerService getTimelineDelegationTokenSecretManagerService(); void setTimelineDelegationTokenSecretManagerService(
      TimelineDelegationTokenSecretManagerService secretManagerService); TimelineDataManager getTimelineDataManager(); void setTimelineDataManager(TimelineDataManager timelineDataManager); @Override void setup(); }
AHSWebApp extends WebApp implements YarnWebParams { public static AHSWebApp getInstance() { if (instance == null) { instance = new AHSWebApp(); } return instance; } private  AHSWebApp(); static AHSWebApp getInstance(); @Private @VisibleForTesting static void resetInstance(); ApplicationHistoryManager getApplicationHistoryManager(); void setApplicationHistoryManager(
      ApplicationHistoryManager applicationHistoryManager); TimelineDelegationTokenSecretManagerService getTimelineDelegationTokenSecretManagerService(); void setTimelineDelegationTokenSecretManagerService(
      TimelineDelegationTokenSecretManagerService secretManagerService); TimelineDataManager getTimelineDataManager(); void setTimelineDataManager(TimelineDataManager timelineDataManager); @Override void setup();  }