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();  }
@Test public void testNonCachingPublicationsFileAdapterReturnsPublicationFile() throws Exception { assertNotNull(adapter.getPublicationsFile()); }
@Test public void testNonCachingPublicationsFileAdapterAlwaysCreatesHttpRequest() throws Exception { adapter.getPublicationsFile(); adapter.getPublicationsFile(); verify(mockedPublicationsFileClient, times(2)).getPublicationsFile(); }