test_class.declarator: USER_NAME = "admin@example.com"
test_class.modifier: private static final
test_class.original_string: private static final String USER_NAME = "admin@example.com";
test_class.type: String
test_class.var_name: USER_NAME
test_class.declarator: USER = new User(randomUUID(), randomUUID(), USER_NAME, "a user")
test_class.modifier: private static final
test_class.original_string: private static final User USER = new User(randomUUID(), randomUUID(), USER_NAME, "a user");
test_class.type: User
test_class.var_name: USER
test_class.declarator: usersReadService
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private UsersReadService usersReadService;
test_class.type: UsersReadService
test_class.var_name: usersReadService
test_class.declarator: appUserDetailsService
test_class.modifier: private
test_class.original_string: private AppUserDetailsService appUserDetailsService;
test_class.type: AppUserDetailsService
test_class.var_name: appUserDetailsService
test_class.file: security-support/src/test/java/engineering/everest/lhotse/security/userdetails/AppUserDetailsServiceTest.java
test_class.identifier: AppUserDetailsServiceTest
test_case.body: @Test
      void willLoadUserByUsername() {
          when(usersReadService.getUserByUsername(USER_NAME)).thenReturn(USER);
          UserDetails userDetails = appUserDetailsService.loadUserByUsername(USER_NAME);
  
          assertEquals(new AppUserDetails(USER), userDetails);
      }
test_case.class_method_signature: AppUserDetailsServiceTest.willLoadUserByUsername()
test_case.full_signature: @Test void willLoadUserByUsername()
test_case.identifier: willLoadUserByUsername
test_case.invocations: thenReturn when getUserByUsername loadUserByUsername assertEquals
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void willLoadUserByUsername()
focal_class.declarator: usersReadService
focal_class.modifier: private final
focal_class.original_string: private final UsersReadService usersReadService;
focal_class.type: UsersReadService
focal_class.var_name: usersReadService
focal_class.file: security-support/src/main/java/engineering/everest/lhotse/security/userdetails/AppUserDetailsService.java
focal_class.identifier: AppUserDetailsService
focal_class.interfaces: implements ApplicationUserDetailsService
focal_class.class_method_signature: AppUserDetailsService.AppUserDetailsService(UsersReadService usersReadService)
focal_class.full_signature: public  AppUserDetailsService(UsersReadService usersReadService)
focal_class.identifier: AppUserDetailsService
focal_class.modifiers: public
focal_class.parameters: (UsersReadService usersReadService)
focal_class.signature:  AppUserDetailsService(UsersReadService usersReadService)
focal_class.class_method_signature: AppUserDetailsService.loadUserByUsername(String username)
focal_class.full_signature: @Override public UserDetails loadUserByUsername(String username)
focal_class.identifier: loadUserByUsername
focal_class.modifiers: @Override public
focal_class.parameters: (String username)
focal_class.return: UserDetails
focal_class.signature: UserDetails loadUserByUsername(String username)
focal_method.body: @Override
      public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException {
          User user;
          try {
              user = usersReadService.getUserByUsername(username);
          } catch (NoSuchElementException e) {
              throw new UsernameNotFoundException("Invalid credentials", e);
          }
          return new AppUserDetails(user);
      }
focal_method.class_method_signature: AppUserDetailsService.loadUserByUsername(String username)
focal_method.full_signature: @Override public UserDetails loadUserByUsername(String username)
focal_method.identifier: loadUserByUsername
focal_method.invocations: getUserByUsername
focal_method.modifiers: @Override public
focal_method.parameters: (String username)
focal_method.return: UserDetails
focal_method.signature: UserDetails loadUserByUsername(String username)