@Test public void testGetQueryWithByteBufResult() throws Exception { expectUrlBase("GET", "/rawMovies/{id}"); expect(requestBuilderMock.withRequestProperty("id", "id123")).andReturn(requestBuilderMock); expect(httpResourceGroupMock.newTemplateBuilder("findRawMovieById")).andReturn(httpRequestTemplateBuilderMock); replayAll(); MethodTemplateExecutor executor = createExecutor(SampleMovieService.class, "findRawMovieById"); RibbonRequest ribbonRequest = executor.executeFromTemplate(new Object[]{"id123"}); verifyAll(); assertEquals(ribbonRequestMock, ribbonRequest); }
@SuppressWarnings("unchecked") public <O> RibbonRequest<O> executeFromTemplate(Object[] args) { HttpRequestBuilder<?> requestBuilder = httpRequestTemplateBuilder.build().requestBuilder(); withParameters(requestBuilder, args); withContent(requestBuilder, args); return (RibbonRequest<O>) requestBuilder.build(); }
MethodTemplateExecutor { @SuppressWarnings("unchecked") public <O> RibbonRequest<O> executeFromTemplate(Object[] args) { HttpRequestBuilder<?> requestBuilder = httpRequestTemplateBuilder.build().requestBuilder(); withParameters(requestBuilder, args); withContent(requestBuilder, args); return (RibbonRequest<O>) requestBuilder.build(); } }
MethodTemplateExecutor { @SuppressWarnings("unchecked") public <O> RibbonRequest<O> executeFromTemplate(Object[] args) { HttpRequestBuilder<?> requestBuilder = httpRequestTemplateBuilder.build().requestBuilder(); withParameters(requestBuilder, args); withContent(requestBuilder, args); return (RibbonRequest<O>) requestBuilder.build(); } MethodTemplateExecutor(HttpResourceGroup httpResourceGroup, MethodTemplate methodTemplate, AnnotationProcessorsProvider annotations); }
MethodTemplateExecutor { @SuppressWarnings("unchecked") public <O> RibbonRequest<O> executeFromTemplate(Object[] args) { HttpRequestBuilder<?> requestBuilder = httpRequestTemplateBuilder.build().requestBuilder(); withParameters(requestBuilder, args); withContent(requestBuilder, args); return (RibbonRequest<O>) requestBuilder.build(); } MethodTemplateExecutor(HttpResourceGroup httpResourceGroup, MethodTemplate methodTemplate, AnnotationProcessorsProvider annotations); @SuppressWarnings("unchecked") RibbonRequest<O> executeFromTemplate(Object[] args); static Map<Method, MethodTemplateExecutor> from(HttpResourceGroup httpResourceGroup, Class<?> clientInterface, AnnotationProcessorsProvider annotations); }
MethodTemplateExecutor { @SuppressWarnings("unchecked") public <O> RibbonRequest<O> executeFromTemplate(Object[] args) { HttpRequestBuilder<?> requestBuilder = httpRequestTemplateBuilder.build().requestBuilder(); withParameters(requestBuilder, args); withContent(requestBuilder, args); return (RibbonRequest<O>) requestBuilder.build(); } MethodTemplateExecutor(HttpResourceGroup httpResourceGroup, MethodTemplate methodTemplate, AnnotationProcessorsProvider annotations); @SuppressWarnings("unchecked") RibbonRequest<O> executeFromTemplate(Object[] args); static Map<Method, MethodTemplateExecutor> from(HttpResourceGroup httpResourceGroup, Class<?> clientInterface, AnnotationProcessorsProvider annotations);  }