@Test public void retrievingOfPreparedStatementPrimes() { Map<String, Object> rows = new HashMap<String, Object>(); rows.put("name", "Chris"); PrimingRequest pr = PrimingRequest.preparedStatementBuilder() .withQuery("select * from people") .withConsistency(Consistency.ANY) .withVariableTypes(ColumnTypes.Varchar) .withColumnTypes(ImmutableMap.of("name", ColumnTypes.Varchar)) .withRows(rows) .build(); stubFor(get(urlEqualTo(PRIME_PREPARED_PATH)).willReturn(aResponse().withStatus(200).withBody( "[{" + " \"when\": {" + " \"query\": \"select * from people\"," + " \"consistency\": [\"ANY\"]" + " }," + " \"then\": {" + " \"variable_types\": [" + " \"varchar\"" + " ]," + " \"rows\": [" + " {" + " \"name\": \"Chris\"" + " }" + " ]," + " \"result\": \"success\"," + " \"column_types\": {" + " \"name\": \"varchar\"" + " }" + " }" + "}]" ))); List<PrimingRequest> primingRequests = underTest.retrievePreparedPrimes(); assertEquals(1, primingRequests.size()); assertEquals(pr, primingRequests.get(0)); }
public List<PrimingRequest> retrievePreparedPrimes() { return httpGetSinglePrimingRequests(primePreparedUrl); }
PrimingClient { public List<PrimingRequest> retrievePreparedPrimes() { return httpGetSinglePrimingRequests(primePreparedUrl); } }
PrimingClient { public List<PrimingRequest> retrievePreparedPrimes() { return httpGetSinglePrimingRequests(primePreparedUrl); } private  PrimingClient(String host, int port); }
PrimingClient { public List<PrimingRequest> retrievePreparedPrimes() { return httpGetSinglePrimingRequests(primePreparedUrl); } private  PrimingClient(String host, int port); static PrimingClientBuilder builder(); void prime(PrimingRequest prime); void prime(PrimingRequest.PrimingRequestBuilder prime); void primeBatch(BatchPrimingRequest batchPrimingRequest); void primeBatch(BatchPrimingRequest.BatchPrimingRequestBuilder batchPrimingRequest); void multiPrime(MultiPrimeRequest primeRequest); @Deprecated void primeQuery(PrimingRequest primeRequest); @Deprecated void primePreparedStatement(PrimingRequest primeRequest); List<PrimingRequest> retrievePreparedPrimes(); List<MultiPrimeRequest> retrievePreparedMultiPrimes(); List<PrimingRequest> retrieveQueryPrimes(); void clearAllPrimes(); void clearQueryPrimes(); void clearPreparedPrimes(); void clearPreparedMultiPrimes(); void clearBatchPrimes(); }
PrimingClient { public List<PrimingRequest> retrievePreparedPrimes() { return httpGetSinglePrimingRequests(primePreparedUrl); } private  PrimingClient(String host, int port); static PrimingClientBuilder builder(); void prime(PrimingRequest prime); void prime(PrimingRequest.PrimingRequestBuilder prime); void primeBatch(BatchPrimingRequest batchPrimingRequest); void primeBatch(BatchPrimingRequest.BatchPrimingRequestBuilder batchPrimingRequest); void multiPrime(MultiPrimeRequest primeRequest); @Deprecated void primeQuery(PrimingRequest primeRequest); @Deprecated void primePreparedStatement(PrimingRequest primeRequest); List<PrimingRequest> retrievePreparedPrimes(); List<MultiPrimeRequest> retrievePreparedMultiPrimes(); List<PrimingRequest> retrieveQueryPrimes(); void clearAllPrimes(); void clearQueryPrimes(); void clearPreparedPrimes(); void clearPreparedMultiPrimes(); void clearBatchPrimes(); static final String DELETING_OF_PRIMES_FAILED; static final String PRIMING_FAILED; }