@Test public void getAuthenticatedUserIdReturnsIdOfAuthenticatedUser() { given(retrieverMock.getUserId()).willReturn(USER_ID); var actualId = userAuthService.getAuthenticatedUserId(); assertThat(actualId).isEqualTo(USER_ID); }
@Override public String getAuthenticatedUserId() { return retriever.getUserId(); }
DefaultUserAuthService implements UserAuthService { @Override public String getAuthenticatedUserId() { return retriever.getUserId(); } }
DefaultUserAuthService implements UserAuthService { @Override public String getAuthenticatedUserId() { return retriever.getUserId(); } DefaultUserAuthService(UserService userService, AuthenticationInfoRetriever retriever); }
DefaultUserAuthService implements UserAuthService { @Override public String getAuthenticatedUserId() { return retriever.getUserId(); } DefaultUserAuthService(UserService userService, AuthenticationInfoRetriever retriever); @Override User getAuthenticatedUser(); @Override String getAuthenticatedUserId(); @Override boolean authenticatedUserIsAdmin(); @Override boolean userIsEffectivelyAManager(User user); }
DefaultUserAuthService implements UserAuthService { @Override public String getAuthenticatedUserId() { return retriever.getUserId(); } DefaultUserAuthService(UserService userService, AuthenticationInfoRetriever retriever); @Override User getAuthenticatedUser(); @Override String getAuthenticatedUserId(); @Override boolean authenticatedUserIsAdmin(); @Override boolean userIsEffectivelyAManager(User user);  }