@Test(timeout = 1000) public void testSingleProfileFromRequestDirectly(final TestContext testContext) { final CommonProfile profile = new CommonProfile(); profile.setClientName(CLIENT1); webContext.setRequestAttribute(USER_PROFILES, profile); final Async async = testContext.async(); profileManager.getAll(false) .thenAccept(l -> executionContext.runOnContext(() -> { assertThat(l, is(Arrays.asList(profile))); async.complete(); })); }
public CompletableFuture<List<U>> getAll(final boolean readFromSession) { final CompletableFuture<Map<String, U>> profilesFuture = retrieveAll(readFromSession); return profilesFuture .thenApply(ProfileHelper::flatIntoAProfileList); }
AsyncProfileManager { public CompletableFuture<List<U>> getAll(final boolean readFromSession) { final CompletableFuture<Map<String, U>> profilesFuture = retrieveAll(readFromSession); return profilesFuture .thenApply(ProfileHelper::flatIntoAProfileList); } }
AsyncProfileManager { public CompletableFuture<List<U>> getAll(final boolean readFromSession) { final CompletableFuture<Map<String, U>> profilesFuture = retrieveAll(readFromSession); return profilesFuture .thenApply(ProfileHelper::flatIntoAProfileList); } AsyncProfileManager(final C context); }
AsyncProfileManager { public CompletableFuture<List<U>> getAll(final boolean readFromSession) { final CompletableFuture<Map<String, U>> profilesFuture = retrieveAll(readFromSession); return profilesFuture .thenApply(ProfileHelper::flatIntoAProfileList); } AsyncProfileManager(final C context); CompletableFuture<Optional<U>> get(final boolean readFromSession); CompletableFuture<List<U>> getAll(final boolean readFromSession); CompletableFuture<Void> remove(final boolean removeFromSession); CompletableFuture<Void> save(final boolean saveInSession, final U profile, final boolean multiProfile); CompletableFuture<Void> logout(); CompletableFuture<Boolean> isAuthenticated(); }
AsyncProfileManager { public CompletableFuture<List<U>> getAll(final boolean readFromSession) { final CompletableFuture<Map<String, U>> profilesFuture = retrieveAll(readFromSession); return profilesFuture .thenApply(ProfileHelper::flatIntoAProfileList); } AsyncProfileManager(final C context); CompletableFuture<Optional<U>> get(final boolean readFromSession); CompletableFuture<List<U>> getAll(final boolean readFromSession); CompletableFuture<Void> remove(final boolean removeFromSession); CompletableFuture<Void> save(final boolean saveInSession, final U profile, final boolean multiProfile); CompletableFuture<Void> logout(); CompletableFuture<Boolean> isAuthenticated();  }