@Test @WithMockUser(USERNAME_USER) void getCurrentUser() { User existingUser = mock(User.class); when(userService.getUser(USERNAME_USER)).thenReturn(existingUser); assertEquals(existingUser, userAccountServiceImpl.getCurrentUser()); }
@Override @Transactional(readOnly = true) public User getCurrentUser() { return userService.getUser(SecurityUtils.getCurrentUsername()); }
UserAccountServiceImpl implements UserAccountService { @Override @Transactional(readOnly = true) public User getCurrentUser() { return userService.getUser(SecurityUtils.getCurrentUsername()); } }
UserAccountServiceImpl implements UserAccountService { @Override @Transactional(readOnly = true) public User getCurrentUser() { return userService.getUser(SecurityUtils.getCurrentUsername()); }  }
UserAccountServiceImpl implements UserAccountService { @Override @Transactional(readOnly = true) public User getCurrentUser() { return userService.getUser(SecurityUtils.getCurrentUsername()); }  @Override @Transactional(readOnly = true) User getCurrentUser(); @Override @PreAuthorize("hasAnyRole('ROLE_SU', 'ROLE_USER')") @Transactional void updateCurrentUser(User updatedCurrentUser); @Override @PreAuthorize("hasAnyRole('ROLE_SU', 'ROLE_USER')") @Transactional boolean validateCurrentUserPassword(String password); void setPasswordEncoder(PasswordEncoder passwordEncoder); }
UserAccountServiceImpl implements UserAccountService { @Override @Transactional(readOnly = true) public User getCurrentUser() { return userService.getUser(SecurityUtils.getCurrentUsername()); }  @Override @Transactional(readOnly = true) User getCurrentUser(); @Override @PreAuthorize("hasAnyRole('ROLE_SU', 'ROLE_USER')") @Transactional void updateCurrentUser(User updatedCurrentUser); @Override @PreAuthorize("hasAnyRole('ROLE_SU', 'ROLE_USER')") @Transactional boolean validateCurrentUserPassword(String password); void setPasswordEncoder(PasswordEncoder passwordEncoder);  }