WorkspaceManager { public Workspace getOrCreateWorkspace(String name) { checkNotNull("name", name); Workspace workspace = new WorkspaceImpl(name); workspaces.computeIfAbsent(new WorkspaceImpl(name), w -> this.createCache()); return this.getWorkspace(name); } WorkspaceManager(); @Inject  WorkspaceManager(WorkspaceManagerPreferences workspaceManagerPreferences); @PostConstruct void initialize(); Workspace getOrCreateWorkspace(String name); Workspace getWorkspace(String name); T getBean(Workspace workspace,
                         String beanName); void putBean(Workspace workspace,
                            String beanName,
                            T instance); void delete(final Workspace workspace); int getWorkspaceCount(); long getBeansCount(final Workspace workspace);  }
@Test public void testCreateWorkspace() { final Workspace workspace = this.workspaceManager.getOrCreateWorkspace("hendrix"); assertEquals("hendrix", workspace.getName()); }