### Question:
CmsAspspPisExportController implements CmsAspspPisExportApi { @Override public ResponseEntity<Collection<CmsPayment>> getPaymentsByPsu(LocalDate start, LocalDate end, String psuId, String psuIdType, String psuCorporateId, String psuCorporateIdType, String instanceId) { PsuIdData psuIdData = new PsuIdData(psuId, psuIdType, psuCorporateId, psuCorporateIdType, null); Collection<CmsPayment> payments = cmsAspspPisExportService.exportPaymentsByPsu(psuIdData, start, end, instanceId); return new ResponseEntity<>(payments, HttpStatus.OK); }  @Override ResponseEntity<Collection<CmsPayment>> getPaymentsByTpp(String tppId, LocalDate start, LocalDate end, String psuId, String psuIdType, String psuCorporateId, String psuCorporateIdType, String instanceId); @Override ResponseEntity<Collection<CmsPayment>> getPaymentsByPsu(LocalDate start, LocalDate end, String psuId, String psuIdType, String psuCorporateId, String psuCorporateIdType, String instanceId); @Override ResponseEntity<Collection<CmsPayment>> getPaymentsByAccountId(String aspspAccountId, LocalDate start, LocalDate end, String instanceId);  }### Answer:
@Test void getPaymentsByPsu() throws Exception { when(cmsAspspPisExportService.exportPaymentsByPsu(psuIdData, START_DATE, END_DATE, INSTANCE_ID)) .thenReturn(cmsPayments); mockMvc.perform(get(EXPORT_PIS_CONSENT_BY_PSU) .contentType(MediaType.APPLICATION_JSON_VALUE) .headers(httpHeaders)) .andExpect(status().is(HttpStatus.OK.value())) .andExpect(content().json(jsonReader.getStringFromFile(LIST_OF_PIIS_CONSENTS_PATH))); verify(cmsAspspPisExportService, times(1)).exportPaymentsByPsu(psuIdData, START_DATE, END_DATE, INSTANCE_ID); }