OpenTipBotUserService { public void createNewOpenTipBotUser(OpenTipBotUser opentipbotUser) throws OpenTipBotServiceException { opentipbotUser.setCoinAddress(bitcoinService.getNewAdress(opentipbotUser.getUserName())); opentipbotUser.setCoinAddressQRCode(bitcoinService.generateAdressQRCodeImage(opentipbotUser.getCoinAddress())); double pendingTips = bitcoinService.getPendingBalance(opentipbotUser.getUserName()); if (pendingTips > 0){ bitcoinService.sendTip(opentipbotUser.getUserName() + env.getProperty("opentipbot.bitcoin.pendingAccountSuffix"), opentipbotUser.getUserName(), pendingTips); } twitterTemplate.friendOperations().follow(opentipbotUser.getUserName()); opentipbotUserRepository.save(opentipbotUser); }  OpenTipBotUser findByTwitterIdentifier(String twitterIndentifier); OpenTipBotUser findByUserName(String userName); void createNewOpenTipBotUser(OpenTipBotUser opentipbotUser); void updateOpenTipBotUser(OpenTipBotUser opentipbotUser); List<OpenTipBotCommand> getTipsSent(String userName); List<OpenTipBotCommand> getTipsReceived(String userName); List<OpenTipBotCommand> getWithdrawals(String userName);  }
@Test public void createNewOpenTipBotUser() { OpenTipBotUser opentipbotUser = new OpenTipBotUser(); opentipbotUser.setDisplayName("Gilles Cadignan"); opentipbotUser.setTwitterIdentifier("1092039809834"); opentipbotUser.setUserName("gillesCadignan"); opentipbotUser.setProfileImageUrl("http: opentipbotUser.setProfileUrl("http: try { opentipbotUserService.createNewOpenTipBotUser(opentipbotUser); } catch (OpenTipBotServiceException e) { logger.error("Error while create new OpenTipBotUser"); } }