@Test(expected = IllegalStateException.class) public void requestBuilderShouldThrowIllegalStateExceptionWhenExecuteMethodIsCalledAgain() { String url = "http: HttpMethod method = HttpMethod.GET; VolleyerConfiguration configuration = DefaultVolleyerConfigurationFactory.create(); TestPurposeRequestBuilder builder = new TestPurposeRequestBuilder(requestQueue, configuration, url, method); builder.execute(); builder.execute(); }
public Request<Void> execute() { assertFinishState(); ResponseBuilder<Void> builder = withTargetClass(Void.class); return builder.execute(); }
RequestBuilder { public Request<Void> execute() { assertFinishState(); ResponseBuilder<Void> builder = withTargetClass(Void.class); return builder.execute(); } }
RequestBuilder { public Request<Void> execute() { assertFinishState(); ResponseBuilder<Void> builder = withTargetClass(Void.class); return builder.execute(); } RequestBuilder(RequestQueue requestQueue, VolleyerConfiguration configuration, String url, HttpMethod method); }
RequestBuilder { public Request<Void> execute() { assertFinishState(); ResponseBuilder<Void> builder = withTargetClass(Void.class); return builder.execute(); } RequestBuilder(RequestQueue requestQueue, VolleyerConfiguration configuration, String url, HttpMethod method); @SuppressWarnings("unchecked") B addHeader(String key, String value); ResponseBuilder<T> withTargetClass(Class<T> clazz); ResponseBuilder<String> withListener(Listener<String> listener); ResponseBuilder<String> withErrorListener(ErrorListener errorListener); Request<Void> execute(); }
RequestBuilder { public Request<Void> execute() { assertFinishState(); ResponseBuilder<Void> builder = withTargetClass(Void.class); return builder.execute(); } RequestBuilder(RequestQueue requestQueue, VolleyerConfiguration configuration, String url, HttpMethod method); @SuppressWarnings("unchecked") B addHeader(String key, String value); ResponseBuilder<T> withTargetClass(Class<T> clazz); ResponseBuilder<String> withListener(Listener<String> listener); ResponseBuilder<String> withErrorListener(ErrorListener errorListener); Request<Void> execute();  }