@Test void replayCompleted_WillCreateAdminUser_WhenAdminUserNotPresentInUsersProjection() { adminProvisionTask.replayCompleted(); verify(usersRepository).save( new PersistableUser(ADMIN_ID, null, ADMIN_USERNAME, ENCODED_PASSWORD, ADMIN_DISPLAY_NAME, false, EnumSet.of(ADMIN), Instant.now(clock))); }
@Override public void replayCompleted() { run(); }
AdminProvisionTask implements ReplayCompletionAware { @Override public void replayCompleted() { run(); } }
AdminProvisionTask implements ReplayCompletionAware { @Override public void replayCompleted() { run(); } AdminProvisionTask(Clock clock,
                              UsersRepository usersRepository,
                              PasswordEncoder passwordEncoder,
                              @Value("${application.setup.admin.username}") String adminUsername,
                              @Value("${application.setup.admin.password}") String adminPassword); }
AdminProvisionTask implements ReplayCompletionAware { @Override public void replayCompleted() { run(); } AdminProvisionTask(Clock clock,
                              UsersRepository usersRepository,
                              PasswordEncoder passwordEncoder,
                              @Value("${application.setup.admin.username}") String adminUsername,
                              @Value("${application.setup.admin.password}") String adminPassword); @PostConstruct void run(); @Override void replayCompleted(); }
AdminProvisionTask implements ReplayCompletionAware { @Override public void replayCompleted() { run(); } AdminProvisionTask(Clock clock,
                              UsersRepository usersRepository,
                              PasswordEncoder passwordEncoder,
                              @Value("${application.setup.admin.username}") String adminUsername,
                              @Value("${application.setup.admin.password}") String adminPassword); @PostConstruct void run(); @Override void replayCompleted();  }