test_class.declarator: usersPath
test_class.modifier: private
test_class.original_string: private Path usersPath;
test_class.type: Path
test_class.var_name: usersPath
test_class.declarator: credentialsPath
test_class.modifier: private
test_class.original_string: private Path credentialsPath;
test_class.type: Path
test_class.var_name: credentialsPath
test_class.declarator: admin = new StdUser("admin", ImmutableSet.<String>of("restx-admin"))
test_class.modifier: private
test_class.original_string: private StdUser admin = new StdUser("admin", ImmutableSet.<String>of("restx-admin"));
test_class.type: StdUser
test_class.var_name: admin
test_class.declarator: mapper = new ObjectMapper().registerModule(new GuavaModule())
test_class.modifier: private
test_class.original_string: private ObjectMapper mapper = new ObjectMapper().registerModule(new GuavaModule());
test_class.type: ObjectMapper
test_class.var_name: mapper
test_class.file: restx-security-basic/src/test/java/restx/security/FileBasedUserRepositoryTest.java
test_class.identifier: FileBasedUserRepositoryTest
test_case.body: @Test
      public void should_load_users() throws Exception {
          FileBasedUserRepository<StdUser> repo = newRepo(false);
  
          Files.copy(getClass().getResourceAsStream("users.json"), usersPath, StandardCopyOption.REPLACE_EXISTING);
  
          assertThat(repo.findUserByName("admin").isPresent()).isFalse();
  
          checkUser(repo.findUserByName("john"), "john", "role1");
      }
test_case.class_method_signature: FileBasedUserRepositoryTest.should_load_users()
test_case.full_signature: @Test public void should_load_users()
test_case.identifier: should_load_users
test_case.invocations: newRepo copy getResourceAsStream getClass isFalse assertThat isPresent findUserByName checkUser findUserByName
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void should_load_users()
focal_class.declarator: logger = LoggerFactory.getLogger(FileBasedUserRepository.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(FileBasedUserRepository.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: userClass
focal_class.modifier: private final
focal_class.original_string: private final Class<U> userClass;
focal_class.type: Class<U>
focal_class.var_name: userClass
focal_class.declarator: defaultAdmin
focal_class.modifier: private final
focal_class.original_string: private final U defaultAdmin;
focal_class.type: U
focal_class.var_name: defaultAdmin
focal_class.declarator: credentials
focal_class.modifier: private final
focal_class.original_string: private final CachedData<String> credentials;
focal_class.type: CachedData<String>
focal_class.var_name: credentials
focal_class.declarator: users
focal_class.modifier: private final
focal_class.original_string: private final CachedData<U> users;
focal_class.type: CachedData<U>
focal_class.var_name: users
focal_class.file: restx-security-basic/src/main/java/restx/security/FileBasedUserRepository.java
focal_class.identifier: FileBasedUserRepository
focal_class.interfaces: implements UserRepository<U>
focal_class.class_method_signature: FileBasedUserRepository.FileBasedUserRepository(Class<U> userClass, ObjectMapper mapper, U defaultAdmin,
                                     Path usersPath, Path credentialsPath, boolean reloadOnChange)
focal_class.full_signature: public  FileBasedUserRepository(Class<U> userClass, ObjectMapper mapper, U defaultAdmin,
                                     Path usersPath, Path credentialsPath, boolean reloadOnChange)
focal_class.identifier: FileBasedUserRepository
focal_class.modifiers: public
focal_class.parameters: (Class<U> userClass, ObjectMapper mapper, U defaultAdmin,
                                     Path usersPath, Path credentialsPath, boolean reloadOnChange)
focal_class.signature:  FileBasedUserRepository(Class<U> userClass, ObjectMapper mapper, U defaultAdmin,
                                     Path usersPath, Path credentialsPath, boolean reloadOnChange)
focal_class.class_method_signature: FileBasedUserRepository.findUserByName(String name)
focal_class.full_signature: @Override public Optional<U> findUserByName(String name)
focal_class.identifier: findUserByName
focal_class.modifiers: @Override public
focal_class.parameters: (String name)
focal_class.return: Optional<U>
focal_class.signature: Optional<U> findUserByName(String name)
focal_class.class_method_signature: FileBasedUserRepository.findCredentialByUserName(String userName)
focal_class.full_signature: @Override public Optional<String> findCredentialByUserName(String userName)
focal_class.identifier: findCredentialByUserName
focal_class.modifiers: @Override public
focal_class.parameters: (String userName)
focal_class.return: Optional<String>
focal_class.signature: Optional<String> findCredentialByUserName(String userName)
focal_class.class_method_signature: FileBasedUserRepository.isAdminDefined()
focal_class.full_signature: @Override public boolean isAdminDefined()
focal_class.identifier: isAdminDefined
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isAdminDefined()
focal_class.class_method_signature: FileBasedUserRepository.defaultAdmin()
focal_class.full_signature: @Override public U defaultAdmin()
focal_class.identifier: defaultAdmin
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: U
focal_class.signature: U defaultAdmin()
focal_method.body: @Override
      public Optional<U> findUserByName(String name) {
          return users.get(name);
      }
focal_method.class_method_signature: FileBasedUserRepository.findUserByName(String name)
focal_method.full_signature: @Override public Optional<U> findUserByName(String name)
focal_method.identifier: findUserByName
focal_method.invocations: get
focal_method.modifiers: @Override public
focal_method.parameters: (String name)
focal_method.return: Optional<U>
focal_method.signature: Optional<U> findUserByName(String name)