DatastoreManager extends ManagerBase implements StoreManager { @Override public Set<String> getSessionIdsFull() { Set<String> sessionsId = null; try { String[] keys = this.store.keys(); sessionsId = new HashSet<>(Arrays.asList(keys)); } catch (IOException e) { log.error("An error occurred while listing active sessions: ", e); } return sessionsId; }  @Override Session findSession(String id); @Override void load(); @Override void unload(); @Override void removeSuper(Session session); @Override void remove(Session session); @Override int getActiveSessionsFull(); @Override Set<String> getSessionIdsFull(); @Override void processExpires(); Store getStore(); void setStore(Store store);  }
@Test public void testListOfActiveSessions() throws IOException { when(store.keys()).thenReturn(new String[0]); manager.getSessionIdsFull(); verify(store).keys(); }