### Question:
AccountHelperService { public SpiAccountReference findAccountReference(List<AccountReference> references, String resourceId) { return references.stream() .filter(accountReference -> StringUtils.equals(accountReference.getResourceId(), resourceId)) .findFirst() .map(xs2aToSpiAccountReferenceMapper::mapToSpiAccountReference) .orElse(null); }  SpiAccountReference findAccountReference(List<AccountReference> references, String resourceId); SpiContextData getSpiContextData();  }### Answer:
@Test void findAccountReference_WithNullAccountAccessType() { when(xs2aToSpiAccountReferenceMapper.mapToSpiAccountReference(XS2A_ACCOUNT_REFERENCE)) .thenReturn(SPI_ACCOUNT_REFERENCE); SpiAccountReference actual = accountHelperService.findAccountReference(REFERENCES, ACCOUNT_ID); assertEquals(SPI_ACCOUNT_REFERENCE, actual); }