@Test public void getGroupsForUser() throws ComponentLookupException { Set<Group> groups = new LinkedHashSet<Group>(); User user = mock(User.class); groups.add(mock(Group.class)); GroupManager manager = this.mocker.getInstance(GroupManager.class); when(manager.getGroupsForUser(user)).thenReturn(groups); Assert.assertSame(groups, this.mocker.getComponentUnderTest().getGroupsForUser(user)); }
public Set<Group> getGroupsForUser(User user) { try { return this.manager.getGroupsForUser(user); } catch (Exception ex) { return Collections.emptySet(); } }
GroupManagerScriptService implements ScriptService { public Set<Group> getGroupsForUser(User user) { try { return this.manager.getGroupsForUser(user); } catch (Exception ex) { return Collections.emptySet(); } } }
GroupManagerScriptService implements ScriptService { public Set<Group> getGroupsForUser(User user) { try { return this.manager.getGroupsForUser(user); } catch (Exception ex) { return Collections.emptySet(); } }  }
GroupManagerScriptService implements ScriptService { public Set<Group> getGroupsForUser(User user) { try { return this.manager.getGroupsForUser(user); } catch (Exception ex) { return Collections.emptySet(); } }  Set<Group> getGroupsForUser(User user); }
GroupManagerScriptService implements ScriptService { public Set<Group> getGroupsForUser(User user) { try { return this.manager.getGroupsForUser(user); } catch (Exception ex) { return Collections.emptySet(); } }  Set<Group> getGroupsForUser(User user);  }