@Test public void componentTest() throws LoaderException, IOException { final RequestMapper mapper = Routes.route().lookup("/v1/test", RequestMethod.GET); Assert.assertNotNull(mapper); final RequestMethod[] requestMethods = mapper.getRequestMethods(); final List<RequestMethod> methods = Lists.asList(requestMethods[0], requestMethods); Assert.assertEquals(methods.contains(RequestMethod.GET), true); Assert.assertEquals(methods.contains(RequestMethod.POST), true); Assert.assertEquals(mapper.getInstance() instanceof TestComponent, true); final Object ret = Components.invoke(mapper, Maps.newHashMap()); Assert.assertNotNull(ret); Assert.assertEquals(ret, "OK"); }
public static Object invoke(final RequestMapper mapper) { return invoke(mapper, Maps.newHashMap()); }
Components { public static Object invoke(final RequestMapper mapper) { return invoke(mapper, Maps.newHashMap()); } }
Components { public static Object invoke(final RequestMapper mapper) { return invoke(mapper, Maps.newHashMap()); } private  Components(); }
Components { public static Object invoke(final RequestMapper mapper) { return invoke(mapper, Maps.newHashMap()); } private  Components(); static final void load(); static final void reload(); static final void destroy(); @SuppressWarnings("deprecation") static final Object[] bindParam(final Method method, final Map<String, Object> params, final Object... objs); static Object invoke(final RequestMapper mapper); static final Object invoke(final RequestMapper mapper, final Map<String, Object> parameter, final Object... objs); }
Components { public static Object invoke(final RequestMapper mapper) { return invoke(mapper, Maps.newHashMap()); } private  Components(); static final void load(); static final void reload(); static final void destroy(); @SuppressWarnings("deprecation") static final Object[] bindParam(final Method method, final Map<String, Object> params, final Object... objs); static Object invoke(final RequestMapper mapper); static final Object invoke(final RequestMapper mapper, final Map<String, Object> parameter, final Object... objs);  }