PoTransaction { public final void prepareSvReadAllLogs() { if (calypsoPo.getApplicationSubtype() != CalypsoPoUtils.STORED_VALUE_FILE_STRUCTURE_ID) { throw new CalypsoPoTransactionIllegalStateException( "The currently selected application is not an SV application."); } calypsoPo.setSvData(0, 0, null, null); prepareReadRecordFile( CalypsoPoUtils.SV_RELOAD_LOG_FILE_SFI, CalypsoPoUtils.SV_RELOAD_LOG_FILE_NB_REC); prepareReadRecordFile( CalypsoPoUtils.SV_DEBIT_LOG_FILE_SFI, 1, CalypsoPoUtils.SV_DEBIT_LOG_FILE_NB_REC, CalypsoPoUtils.SV_LOG_FILE_REC_LENGTH); } PoTransaction(SeResource<CalypsoPo> poResource, PoSecuritySettings poSecuritySettings);  PoTransaction(SeResource<CalypsoPo> poResource); final void processOpening(PoTransaction.SessionSetting.AccessLevel accessLevel); final void processPoCommands(); final void processClosing(); final void processCancel(); final void processVerifyPin(byte[] pin); final void processVerifyPin(String pin); final void prepareReleasePoChannel(); final void prepareSelectFile(byte[] lid); final void prepareSelectFile(SelectFileControl control); final void prepareReadRecordFile(byte sfi, int recordNumber); final void prepareReadRecordFile(
      byte sfi, int firstRecordNumber, int numberOfRecords, int recordSize); final void prepareReadCounterFile(byte sfi, int countersNumber); final void prepareAppendRecord(byte sfi, byte[] recordData); final void prepareUpdateRecord(byte sfi, int recordNumber, byte[] recordData); final void prepareWriteRecord(byte sfi, int recordNumber, byte[] recordData); final void prepareIncreaseCounter(byte sfi, int counterNumber, int incValue); final void prepareDecreaseCounter(byte sfi, int counterNumber, int decValue); final void prepareCheckPinStatus(); final void prepareSvGet(SvSettings.Operation svOperation, SvSettings.Action svAction); final void prepareSvReload(int amount, byte[] date, byte[] time, byte[] free); final void prepareSvReload(int amount); final void prepareSvDebit(int amount, byte[] date, byte[] time); final void prepareSvDebit(int amount); final void prepareSvReadAllLogs(); final void prepareInvalidate(); final void prepareRehabilitate();  }
@Test public void testPrepareSvReadAllLogs() { CalypsoPo calypsoPoRev31 = createCalypsoPo(FCI_STORED_VALUE_REV31); poTransaction = new PoTransaction(new SeResource<CalypsoPo>(poReader, calypsoPoRev31)); poCommandsTestSet.put(PO_READ_SV_LOAD_LOG_FILE_CMD, PO_READ_SV_LOAD_LOG_FILE_RSP); poCommandsTestSet.put(PO_READ_SV_DEBIT_LOG_FILE_CMD, PO_READ_SV_DEBIT_LOG_FILE_RSP); poTransaction.prepareSvReadAllLogs(); poTransaction.prepareReleasePoChannel(); poTransaction.processPoCommands(); assertThat(calypsoPoRev31.getSvLoadLogRecord()).isNotNull(); assertThat(calypsoPoRev31.getSvDebitLogLastRecord()).isNotNull(); List<SvDebitLogRecord> allDebitLogs = calypsoPoRev31.getSvDebitLogAllRecords(); assertThat(calypsoPoRev31.getSvDebitLogAllRecords().size()).isEqualTo(3); assertThat(allDebitLogs.get(0).getSamId()).isEqualTo(0xAABBCC01); assertThat(allDebitLogs.get(1).getSamId()).isEqualTo(0xAABBCC02); assertThat(allDebitLogs.get(2).getSamId()).isEqualTo(0xAABBCC03); }