@Test public void testNonCachingPublicationsFileAdapterAlwaysCreatesHttpRequest() throws Exception { adapter.getPublicationsFile(); adapter.getPublicationsFile(); verify(mockedPublicationsFileClient, times(2)).getPublicationsFile(); }
public PublicationsFile getPublicationsFile() throws KSIException { Future<ByteBuffer> data = publicationsFileClient.getPublicationsFile(); return publicationsFileFactory.create(new ByteArrayInputStream(data.getResult().array())); }
NonCachingPublicationsFileClientAdapter implements PublicationsFileClientAdapter { public PublicationsFile getPublicationsFile() throws KSIException { Future<ByteBuffer> data = publicationsFileClient.getPublicationsFile(); return publicationsFileFactory.create(new ByteArrayInputStream(data.getResult().array())); } }
NonCachingPublicationsFileClientAdapter implements PublicationsFileClientAdapter { public PublicationsFile getPublicationsFile() throws KSIException { Future<ByteBuffer> data = publicationsFileClient.getPublicationsFile(); return publicationsFileFactory.create(new ByteArrayInputStream(data.getResult().array())); } NonCachingPublicationsFileClientAdapter(KSIPublicationsFileClient publicationsFileClient, PublicationsFileFactory publicationsFileFactory); }
NonCachingPublicationsFileClientAdapter implements PublicationsFileClientAdapter { public PublicationsFile getPublicationsFile() throws KSIException { Future<ByteBuffer> data = publicationsFileClient.getPublicationsFile(); return publicationsFileFactory.create(new ByteArrayInputStream(data.getResult().array())); } NonCachingPublicationsFileClientAdapter(KSIPublicationsFileClient publicationsFileClient, PublicationsFileFactory publicationsFileFactory); PublicationsFile getPublicationsFile(); KSIPublicationsFileClient getPublicationsFileClient(); }
NonCachingPublicationsFileClientAdapter implements PublicationsFileClientAdapter { public PublicationsFile getPublicationsFile() throws KSIException { Future<ByteBuffer> data = publicationsFileClient.getPublicationsFile(); return publicationsFileFactory.create(new ByteArrayInputStream(data.getResult().array())); } NonCachingPublicationsFileClientAdapter(KSIPublicationsFileClient publicationsFileClient, PublicationsFileFactory publicationsFileFactory); PublicationsFile getPublicationsFile(); KSIPublicationsFileClient getPublicationsFileClient();  }