@Test void accounts() { when(aisService.getAccounts(any())).thenReturn(Collections.singletonList(getAccountDetailsTO())); ResponseEntity<List<AccountDetailsTO>> response = obaAisController.accounts(LOGIN); assertTrue(response.getStatusCode().is2xxSuccessful()); assertEquals(Objects.requireNonNull(response.getBody()).get(0), getAccountDetailsTO()); verify(aisService, times(1)).getAccounts(LOGIN); }
@Override @PreAuthorize("#userLogin == authentication.principal.login") public ResponseEntity<List<AccountDetailsTO>> accounts(String userLogin) { return ResponseEntity.ok(aisService.getAccounts(userLogin)); }
ObaAisController implements ObaAisApi { @Override @PreAuthorize("#userLogin == authentication.principal.login") public ResponseEntity<List<AccountDetailsTO>> accounts(String userLogin) { return ResponseEntity.ok(aisService.getAccounts(userLogin)); } }
ObaAisController implements ObaAisApi { @Override @PreAuthorize("#userLogin == authentication.principal.login") public ResponseEntity<List<AccountDetailsTO>> accounts(String userLogin) { return ResponseEntity.ok(aisService.getAccounts(userLogin)); }  }
ObaAisController implements ObaAisApi { @Override @PreAuthorize("#userLogin == authentication.principal.login") public ResponseEntity<List<AccountDetailsTO>> accounts(String userLogin) { return ResponseEntity.ok(aisService.getAccounts(userLogin)); }  @Override @PreAuthorize("#userLogin == authentication.principal.login") ResponseEntity<List<AccountDetailsTO>> accounts(String userLogin); @Override ResponseEntity<AccountDetailsTO> account(String accountId); @Override ResponseEntity<List<TransactionTO>> transactions(String accountId, LocalDate dateFrom, LocalDate dateTo); @Override ResponseEntity<CustomPageImpl<TransactionTO>> transactions(String accountId, LocalDate dateFrom, LocalDate dateTo, int page, int size); @Override ResponseEntity<List<PaymentTO>> getPendingPeriodicPayments(); }
ObaAisController implements ObaAisApi { @Override @PreAuthorize("#userLogin == authentication.principal.login") public ResponseEntity<List<AccountDetailsTO>> accounts(String userLogin) { return ResponseEntity.ok(aisService.getAccounts(userLogin)); }  @Override @PreAuthorize("#userLogin == authentication.principal.login") ResponseEntity<List<AccountDetailsTO>> accounts(String userLogin); @Override ResponseEntity<AccountDetailsTO> account(String accountId); @Override ResponseEntity<List<TransactionTO>> transactions(String accountId, LocalDate dateFrom, LocalDate dateTo); @Override ResponseEntity<CustomPageImpl<TransactionTO>> transactions(String accountId, LocalDate dateFrom, LocalDate dateTo, int page, int size); @Override ResponseEntity<List<PaymentTO>> getPendingPeriodicPayments();  }