test_class.declarator: defaultAuthServerUserReadService
test_class.modifier: private
test_class.original_string: private DefaultAuthServerUserReadService defaultAuthServerUserReadService;
test_class.type: DefaultAuthServerUserReadService
test_class.var_name: defaultAuthServerUserReadService
test_class.declarator: usersRepository
test_class.modifier: @Mock
      private
test_class.original_string: @Mock
      private UsersRepository usersRepository;
test_class.type: UsersRepository
test_class.var_name: usersRepository
test_class.file: users-persistence/src/test/java/engineering/everest/lhotse/users/authserver/DefaultAuthServerUserReadServiceTest.java
test_class.identifier: DefaultAuthServerUserReadServiceTest
test_case.body: @Test
      void getByUsername_WillReturnAuthServerRepresentationOfPeristableUser() {
          PersistableUser persistableUser = mock(PersistableUser.class);
          when(persistableUser.getUsername()).thenReturn("found-username");
          when(persistableUser.getEncodedPassword()).thenReturn("encoded-password");
          when(persistableUser.isDisabled()).thenReturn(false);
  
          when(usersRepository.findByUsernameIgnoreCase("username")).thenReturn(Optional.of(persistableUser));
  
          AuthServerUser expectedAuthServerUser = new AuthServerUser("found-username", "encoded-password", false);
          assertEquals(expectedAuthServerUser, defaultAuthServerUserReadService.getByUsername("username"));
      }
test_case.class_method_signature: DefaultAuthServerUserReadServiceTest.getByUsername_WillReturnAuthServerRepresentationOfPeristableUser()
test_case.full_signature: @Test void getByUsername_WillReturnAuthServerRepresentationOfPeristableUser()
test_case.identifier: getByUsername_WillReturnAuthServerRepresentationOfPeristableUser
test_case.invocations: mock thenReturn when getUsername thenReturn when getEncodedPassword thenReturn when isDisabled thenReturn when findByUsernameIgnoreCase of assertEquals getByUsername
test_case.modifiers: @Test
test_case.parameters: ()
test_case.return: void
test_case.signature: void getByUsername_WillReturnAuthServerRepresentationOfPeristableUser()
focal_class.declarator: usersRepository
focal_class.modifier: private final
focal_class.original_string: private final UsersRepository usersRepository;
focal_class.type: UsersRepository
focal_class.var_name: usersRepository
focal_class.file: users-persistence/src/main/java/engineering/everest/lhotse/users/authserver/DefaultAuthServerUserReadService.java
focal_class.identifier: DefaultAuthServerUserReadService
focal_class.interfaces: implements AuthServerUserReadService
focal_class.class_method_signature: DefaultAuthServerUserReadService.DefaultAuthServerUserReadService(UsersRepository usersRepository)
focal_class.full_signature: public  DefaultAuthServerUserReadService(UsersRepository usersRepository)
focal_class.identifier: DefaultAuthServerUserReadService
focal_class.modifiers: public
focal_class.parameters: (UsersRepository usersRepository)
focal_class.signature:  DefaultAuthServerUserReadService(UsersRepository usersRepository)
focal_class.class_method_signature: DefaultAuthServerUserReadService.getByUsername(String username)
focal_class.full_signature: @Override public AuthServerUser getByUsername(String username)
focal_class.identifier: getByUsername
focal_class.modifiers: @Override public
focal_class.parameters: (String username)
focal_class.return: AuthServerUser
focal_class.signature: AuthServerUser getByUsername(String username)
focal_method.body: @Override
      public AuthServerUser getByUsername(String username) {
          var persistableUser = usersRepository.findByUsernameIgnoreCase(username).orElseThrow();
          return new AuthServerUser(persistableUser.getUsername(), persistableUser.getEncodedPassword(),
                  persistableUser.isDisabled());
      }
focal_method.class_method_signature: DefaultAuthServerUserReadService.getByUsername(String username)
focal_method.full_signature: @Override public AuthServerUser getByUsername(String username)
focal_method.identifier: getByUsername
focal_method.invocations: orElseThrow findByUsernameIgnoreCase getUsername getEncodedPassword isDisabled
focal_method.modifiers: @Override public
focal_method.parameters: (String username)
focal_method.return: AuthServerUser
focal_method.signature: AuthServerUser getByUsername(String username)