@Test public void testBuildPatentMetaRequest() throws Exception { ImportedPatent.Builder patentBuilder = initializeWithDummyValues(); patentBuilder.setPublnAuth("pubAuth"); patentBuilder.setPublnKind("pubKind"); patentBuilder.setPublnNr("pubNr"); String bearerToken = "someToken"; HttpRequest httpRequest = OpenPatentWebServiceFacade.buildPatentMetaRequest(patentBuilder.build(), bearerToken, opsUriRoot); assertNotNull(httpRequest); assertEquals(OpenPatentWebServiceFacade.getPatentMetaUrl(patentBuilder.build(), opsUriRoot), httpRequest.getRequestLine().getUri()); assertEquals("Bearer " + bearerToken, httpRequest.getLastHeader("Authorization").getValue()); }
protected static HttpRequest buildPatentMetaRequest(ImportedPatent patent, String bearerToken, String urlRoot) { HttpGet httpRequest = new HttpGet(getPatentMetaUrl(patent, urlRoot)); httpRequest.addHeader("Authorization", "Bearer " + bearerToken); return httpRequest; }
OpenPatentWebServiceFacade implements PatentServiceFacade { protected static HttpRequest buildPatentMetaRequest(ImportedPatent patent, String bearerToken, String urlRoot) { HttpGet httpRequest = new HttpGet(getPatentMetaUrl(patent, urlRoot)); httpRequest.addHeader("Authorization", "Bearer " + bearerToken); return httpRequest; } }
OpenPatentWebServiceFacade implements PatentServiceFacade { protected static HttpRequest buildPatentMetaRequest(ImportedPatent patent, String bearerToken, String urlRoot) { HttpGet httpRequest = new HttpGet(getPatentMetaUrl(patent, urlRoot)); httpRequest.addHeader("Authorization", "Bearer " + bearerToken); return httpRequest; } OpenPatentWebServiceFacade(ConnectionDetails connDetails); protected  OpenPatentWebServiceFacade(CloseableHttpClient httpClient, HttpHost authHost, String authUriRoot, HttpHost opsHost,
            String opsUriRoot, String consumerCredential, long throttleSleepTime, int maxRetriesCount,
            JsonParser jsonParser); }
OpenPatentWebServiceFacade implements PatentServiceFacade { protected static HttpRequest buildPatentMetaRequest(ImportedPatent patent, String bearerToken, String urlRoot) { HttpGet httpRequest = new HttpGet(getPatentMetaUrl(patent, urlRoot)); httpRequest.addHeader("Authorization", "Bearer " + bearerToken); return httpRequest; } OpenPatentWebServiceFacade(ConnectionDetails connDetails); protected  OpenPatentWebServiceFacade(CloseableHttpClient httpClient, HttpHost authHost, String authUriRoot, HttpHost opsHost,
            String opsUriRoot, String consumerCredential, long throttleSleepTime, int maxRetriesCount,
            JsonParser jsonParser); @Override String getPatentMetadata(ImportedPatent patent); }
OpenPatentWebServiceFacade implements PatentServiceFacade { protected static HttpRequest buildPatentMetaRequest(ImportedPatent patent, String bearerToken, String urlRoot) { HttpGet httpRequest = new HttpGet(getPatentMetaUrl(patent, urlRoot)); httpRequest.addHeader("Authorization", "Bearer " + bearerToken); return httpRequest; } OpenPatentWebServiceFacade(ConnectionDetails connDetails); protected  OpenPatentWebServiceFacade(CloseableHttpClient httpClient, HttpHost authHost, String authUriRoot, HttpHost opsHost,
            String opsUriRoot, String consumerCredential, long throttleSleepTime, int maxRetriesCount,
            JsonParser jsonParser); @Override String getPatentMetadata(ImportedPatent patent);  }