@Test void getUsers() { User existingUser = mock(User.class); when(dataService.findAll(USER, User.class)).thenReturn(Stream.of(existingUser)); assertEquals(singletonList(existingUser), molgenisUserServiceImpl.getUsers()); }
@Override @RunAsSystem public List<User> getUsers() { return dataService.findAll(USER, User.class).collect(toList()); }
UserServiceImpl implements UserService { @Override @RunAsSystem public List<User> getUsers() { return dataService.findAll(USER, User.class).collect(toList()); } }
UserServiceImpl implements UserService { @Override @RunAsSystem public List<User> getUsers() { return dataService.findAll(USER, User.class).collect(toList()); } UserServiceImpl(DataService dataService); }
UserServiceImpl implements UserService { @Override @RunAsSystem public List<User> getUsers() { return dataService.findAll(USER, User.class).collect(toList()); } UserServiceImpl(DataService dataService); @Override @RunAsSystem List<User> getUsers(); @Override @RunAsSystem List<String> getSuEmailAddresses(); @Override @RunAsSystem @Nullable @CheckForNull User getUser(String username); @Override @RunAsSystem void update(User user); @Override @RunAsSystem User getUserByEmail(String email); }
UserServiceImpl implements UserService { @Override @RunAsSystem public List<User> getUsers() { return dataService.findAll(USER, User.class).collect(toList()); } UserServiceImpl(DataService dataService); @Override @RunAsSystem List<User> getUsers(); @Override @RunAsSystem List<String> getSuEmailAddresses(); @Override @RunAsSystem @Nullable @CheckForNull User getUser(String username); @Override @RunAsSystem void update(User user); @Override @RunAsSystem User getUserByEmail(String email);  }