@Test
public void should_reload_users() throws Exception {

    FileBasedUserRepository<StdUser> repo = newRepo(true);
    Files.copy(getClass().getResourceAsStream("users.json"), usersPath, StandardCopyOption.REPLACE_EXISTING);
    checkUser(repo.findUserByName("john"), "john", "role1");
    assertThat(repo.findUserByName("jane").isPresent()).isFalse();
    Thread.sleep(1000); // sleep enough to make sure timestamp changes
    Files.copy(getClass().getResourceAsStream("users2.json"), usersPath, StandardCopyOption.REPLACE_EXISTING);
    checkUser(repo.findUserByName("john"), "john", "role2");
    checkUser(repo.findUserByName("jane"), "jane", "role1", "role2");
}