### Question:
TppController implements TppRestApi { @Override public ResponseEntity<String> getRandomTppId(String countryCode) { BankCodeStructure structure = new BankCodeStructure(CountryCode.getByCode(countryCode)); BbanStructure bbanStructure = new BbanStructure(); bbanStructure.setCountryPrefix(structure.getCountryCode().name()); bbanStructure.setLength(structure.getLength()); bbanStructure.setEntryType(BbanStructure.EntryType.valueOf(structure.getType().name().toUpperCase())); return dataRestClient.branchId(bbanStructure); }  @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 getRandomTppId() { when(dataRestClient.branchId(any())).thenReturn(ResponseEntity.ok("DE_123")); ResponseEntity<String> result = tppController.getRandomTppId("DE"); ArgumentCaptor<BbanStructure> captor = ArgumentCaptor.forClass(BbanStructure.class); verify(dataRestClient, times(1)).branchId(captor.capture()); BbanStructure value = captor.getValue(); assertEquals("DE", value.getCountryPrefix()); assertEquals(8, value.getLength()); assertEquals(BbanStructure.EntryType.N, value.getEntryType()); assertEquals(HttpStatus.OK, result.getStatusCode()); }