@Test void register() { UserTO userTO = getUserTO(); when(userMapper.toUserTO(any())).thenReturn(userTO); when(userMgmtStaffRestClient.register(USER_ID, userTO)).thenReturn(ResponseEntity.ok(userTO)); ResponseEntity<Void> response = tppController.register(getUser()); assertTrue(response.getStatusCode().is2xxSuccessful()); assertEquals(HttpStatus.CREATED, response.getStatusCode()); }
@Override public ResponseEntity<Void> register(User user) { UserTO userTO = userMapper.toUserTO(user); userMgmtStaffRestClient.register(user.getId(), userTO); return ResponseEntity.status(CREATED).build(); }
TppController implements TppRestApi { @Override public ResponseEntity<Void> register(User user) { UserTO userTO = userMapper.toUserTO(user); userMgmtStaffRestClient.register(user.getId(), userTO); return ResponseEntity.status(CREATED).build(); } }
TppController implements TppRestApi { @Override public ResponseEntity<Void> register(User user) { UserTO userTO = userMapper.toUserTO(user); userMgmtStaffRestClient.register(user.getId(), userTO); return ResponseEntity.status(CREATED).build(); }  }
TppController implements TppRestApi { @Override public ResponseEntity<Void> register(User user) { UserTO userTO = userMapper.toUserTO(user); userMgmtStaffRestClient.register(user.getId(), userTO); return ResponseEntity.status(CREATED).build(); }  @Override void login(String login, String pin); @Override ResponseEntity<Set<Currency>> getCurrencies(); @Override ResponseEntity<Map<CountryCode, String>> getSupportedCountryCodes(); @Override ResponseEntity<BankCodeStructure> getBankCodeStructure(String countryCode); @Override ResponseEntity<String> getRandomTppId(String countryCode); @Override ResponseEntity<Void> register(User user); @Override ResponseEntity<Void> remove(); @Override ResponseEntity<Void> transactions(String accountId); @Override ResponseEntity<Void> account(String accountId); @Override ResponseEntity<Void> user(String userId); @Override ResponseEntity<Void> revert(RevertRequestTO revertRequest); }
TppController implements TppRestApi { @Override public ResponseEntity<Void> register(User user) { UserTO userTO = userMapper.toUserTO(user); userMgmtStaffRestClient.register(user.getId(), userTO); return ResponseEntity.status(CREATED).build(); }  @Override void login(String login, String pin); @Override ResponseEntity<Set<Currency>> getCurrencies(); @Override ResponseEntity<Map<CountryCode, String>> getSupportedCountryCodes(); @Override ResponseEntity<BankCodeStructure> getBankCodeStructure(String countryCode); @Override ResponseEntity<String> getRandomTppId(String countryCode); @Override ResponseEntity<Void> register(User user); @Override ResponseEntity<Void> remove(); @Override ResponseEntity<Void> transactions(String accountId); @Override ResponseEntity<Void> account(String accountId); @Override ResponseEntity<Void> user(String userId); @Override ResponseEntity<Void> revert(RevertRequestTO revertRequest);  }