### Question:
TppController implements TppRestApi { @Override public ResponseEntity<Void> remove() { List<String> logins = userMgmtStaffRestClient.getBranchUserLogins().getBody(); cmsDbNativeService.deleteConsentsByUserIds(logins); UserTO user = userMgmtRestClient.getUser().getBody(); return dataRestClient.branch(user.getBranch()); }  @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);  }### Answer:
@Test void remove() { when(userMgmtRestClient.getUser()) .thenReturn(ResponseEntity.ok(getUserTO())); when(userMgmtStaffRestClient.getBranchUserLogins()) .thenReturn(ResponseEntity.ok(Arrays.asList("anton.brueckner", "max.musterman"))); when(dataRestClient.branch(any())).thenAnswer(i -> ResponseEntity.ok().build()); ResponseEntity<Void> response = tppController.remove(); assertTrue(response.getStatusCode().is2xxSuccessful()); assertEquals(HttpStatus.OK, response.getStatusCode()); }