use of org.apache.hadoop.yarn.webapp.WebAppException in project hadoop by apache.
the class WebAppTests method testController.
public static <T> Injector testController(Class<? extends Controller> ctrlr, String methodName, Class<T> api, T impl, Module... modules) {
try {
Injector injector = createMockInjector(api, impl, modules);
Method method = ctrlr.getMethod(methodName, (Class<?>[]) null);
method.invoke(injector.getInstance(ctrlr), (Object[]) null);
return injector;
} catch (Exception e) {
throw new WebAppException(e);
}
}
Aggregations