@Test public void parseQueryParams() throws Exception { TestRequest.Builder request = TestRequest.newBuilder(); UriInfoMap uriInfoMap = new UriInfoMap() .put("s", "string") .put("bytearray", "string") .put("boolean", "true") .put("nt.f1", "2") .put("uint3", "3000000000") .put("int3", "2000000000") .put("uint6", "10000000000000000000") .put("int6", "9000000000000000000") .put("f", "123.456") .put("d", "123.456") .put("enu", "SECOND") .put("rep", "1") .put("rep", "2") .put("rep_str", "a") .put("rep_str", ""); RequestParser.parseQueryParams(uriInfoMap, request); TestRequest r = request.build(); assertThat(r.getS()).isEqualTo("string"); assertThat(r.getBytearray().toStringUtf8()).isEqualTo("string"); assertThat(r.getBoolean()).isTrue(); assertThat(r.getNt().getF1()).isEqualTo("2"); assertThat(r.getUint3()).isEqualTo(-1294967296); assertThat(r.getInt3()).isEqualTo(2000000000); assertThat(r.getUint6()).isEqualTo(-8446744073709551616L); assertThat(r.getInt6()).isEqualTo(9000000000000000000L); assertThat(r.getF()).isEqualTo(123.456f); assertThat(r.getD()).isEqualTo(123.456d); assertThat(r.getEnu()).isEqualTo(TestEnum.SECOND); assertThat(r.getRepList()).isEqualTo(ImmutableList.of(1, 2)); assertThat(r.getRepStrList()).isEqualTo(ImmutableList.of("a", "")); }
public static <V extends Message> void parseQueryParams(UriInfo uriInfo, V.Builder builder, DescriptorProtos.FieldDescriptorProto... pathParams) throws InvalidProtocolBufferException { parseQueryParams(uriInfo, builder, ImmutableList.copyOf(pathParams)); }
RequestParser { public static <V extends Message> void parseQueryParams(UriInfo uriInfo, V.Builder builder, DescriptorProtos.FieldDescriptorProto... pathParams) throws InvalidProtocolBufferException { parseQueryParams(uriInfo, builder, ImmutableList.copyOf(pathParams)); } }
RequestParser { public static <V extends Message> void parseQueryParams(UriInfo uriInfo, V.Builder builder, DescriptorProtos.FieldDescriptorProto... pathParams) throws InvalidProtocolBufferException { parseQueryParams(uriInfo, builder, ImmutableList.copyOf(pathParams)); }  }
RequestParser { public static <V extends Message> void parseQueryParams(UriInfo uriInfo, V.Builder builder, DescriptorProtos.FieldDescriptorProto... pathParams) throws InvalidProtocolBufferException { parseQueryParams(uriInfo, builder, ImmutableList.copyOf(pathParams)); }  static void parseQueryParams(UriInfo uriInfo,
            V.Builder builder,
            DescriptorProtos.FieldDescriptorProto... pathParams); static void parseQueryParams(UriInfo uriInfo,
            V.Builder builder,
            List<DescriptorProtos.FieldDescriptorProto> pathParams); static T parseHeaders(HttpHeaders headers, T stub); static Metadata parseHeaders(HttpHeaders headers); static void setFieldSafely(Message.Builder builder, String path, String value); static void setFieldSafely(Message.Builder builder, String path, List<String> value); static void setFieldSafely(Message.Builder builder, Descriptors.FieldDescriptor fd, List<String> value); static void handleBody(
            String fieldPath,
            V.Builder builder,
            String body); }
RequestParser { public static <V extends Message> void parseQueryParams(UriInfo uriInfo, V.Builder builder, DescriptorProtos.FieldDescriptorProto... pathParams) throws InvalidProtocolBufferException { parseQueryParams(uriInfo, builder, ImmutableList.copyOf(pathParams)); }  static void parseQueryParams(UriInfo uriInfo,
            V.Builder builder,
            DescriptorProtos.FieldDescriptorProto... pathParams); static void parseQueryParams(UriInfo uriInfo,
            V.Builder builder,
            List<DescriptorProtos.FieldDescriptorProto> pathParams); static T parseHeaders(HttpHeaders headers, T stub); static Metadata parseHeaders(HttpHeaders headers); static void setFieldSafely(Message.Builder builder, String path, String value); static void setFieldSafely(Message.Builder builder, String path, List<String> value); static void setFieldSafely(Message.Builder builder, Descriptors.FieldDescriptor fd, List<String> value); static void handleBody(
            String fieldPath,
            V.Builder builder,
            String body);  }