394041424344454647
class ApplicationConfiguration { @Bean public AccountRepository accountRepository() { AccountRepository repository = mock(AccountRepository.class); when(repository.save(any(Account.class))).thenAnswer(withArgument()); return repository; }