@Test void testGetResponseTypeReturnsTheTypeAsSpecifiedInTheQueryRequest() { ResponseType<String> expectedResponseType = RESPONSE_TYPE; QueryMessage<TestQuery, String> testQueryMessage = new GenericQueryMessage<>(TEST_QUERY, expectedResponseType); QueryRequest testQueryRequest = querySerializer.serializeRequest(testQueryMessage, NUMBER_OF_RESULTS, TIMEOUT, PRIORITY); GrpcBackedQueryMessage<TestQuery, String> testSubject = new GrpcBackedQueryMessage<>(testQueryRequest, serializer, serializer); assertEquals( expectedResponseType.getExpectedResponseType(), testSubject.getResponseType().getExpectedResponseType() ); }
@Override public ResponseType<R> getResponseType() { return serializedResponseType.getObject(); }
GrpcBackedQueryMessage implements QueryMessage<Q, R> { @Override public ResponseType<R> getResponseType() { return serializedResponseType.getObject(); } }
GrpcBackedQueryMessage implements QueryMessage<Q, R> { @Override public ResponseType<R> getResponseType() { return serializedResponseType.getObject(); } GrpcBackedQueryMessage(QueryRequest queryRequest,
                                  Serializer messageSerializer,
                                  Serializer serializer); private  GrpcBackedQueryMessage(QueryRequest queryRequest,
                                   LazyDeserializingObject<Q> serializedPayload,
                                   LazyDeserializingObject<ResponseType<R>> serializedResponseType,
                                   Supplier<MetaData> metaDataSupplier); }
GrpcBackedQueryMessage implements QueryMessage<Q, R> { @Override public ResponseType<R> getResponseType() { return serializedResponseType.getObject(); } GrpcBackedQueryMessage(QueryRequest queryRequest,
                                  Serializer messageSerializer,
                                  Serializer serializer); private  GrpcBackedQueryMessage(QueryRequest queryRequest,
                                   LazyDeserializingObject<Q> serializedPayload,
                                   LazyDeserializingObject<ResponseType<R>> serializedResponseType,
                                   Supplier<MetaData> metaDataSupplier); @Override String getQueryName(); @Override ResponseType<R> getResponseType(); @Override String getIdentifier(); @Override MetaData getMetaData(); @Override Q getPayload(); @Override Class<Q> getPayloadType(); @Override GrpcBackedQueryMessage<Q, R> withMetaData(Map<String, ?> metaData); @Override GrpcBackedQueryMessage<Q, R> andMetaData(Map<String, ?> metaData); }
GrpcBackedQueryMessage implements QueryMessage<Q, R> { @Override public ResponseType<R> getResponseType() { return serializedResponseType.getObject(); } GrpcBackedQueryMessage(QueryRequest queryRequest,
                                  Serializer messageSerializer,
                                  Serializer serializer); private  GrpcBackedQueryMessage(QueryRequest queryRequest,
                                   LazyDeserializingObject<Q> serializedPayload,
                                   LazyDeserializingObject<ResponseType<R>> serializedResponseType,
                                   Supplier<MetaData> metaDataSupplier); @Override String getQueryName(); @Override ResponseType<R> getResponseType(); @Override String getIdentifier(); @Override MetaData getMetaData(); @Override Q getPayload(); @Override Class<Q> getPayloadType(); @Override GrpcBackedQueryMessage<Q, R> withMetaData(Map<String, ?> metaData); @Override GrpcBackedQueryMessage<Q, R> andMetaData(Map<String, ?> metaData);  }