PoSelectionRequest extends AbstractSeSelectionRequest<
        AbstractPoCommandBuilder<? extends AbstractPoResponseParser>> { public final void prepareReadRecordFile(byte sfi, int recordNumber) { addCommandBuilder(CalypsoPoUtils.prepareReadRecordFile(poClass, sfi, recordNumber)); } PoSelectionRequest(PoSelector poSelector); final void prepareReadRecordFile(byte sfi, int recordNumber); void prepareSelectFile(byte[] lid); void prepareSelectFile(short lid); void prepareSelectFile(SelectFileControl selectControl);  }
@Test public void testPrepareReadRecordFile() { byte sfi1 = (byte) 0x10; byte sfi2 = (byte) 0x11; int recNumber = 1; poSelectionRequest.prepareReadRecordFile(sfi1, recNumber); poSelectionRequest.prepareReadRecordFile(sfi2, recNumber); List<ApduResponse> apduResponses = new ArrayList<ApduResponse>(); apduResponses.add(READ_REC_APDU_RESPONSE1); apduResponses.add(READ_REC_APDU_RESPONSE2); SelectionStatus selectionStatus = new SelectionStatus( new AnswerToReset(ByteArrayUtil.fromHex(ATR_VALUE)), SELECT_APPLICATION_RESPONSE, true); SeResponse seResponse = new SeResponse(true, true, selectionStatus, apduResponses); CalypsoPo calypsoPo = poSelectionRequest.parse(seResponse); ElementaryFile ef1 = calypsoPo.getFileBySfi(sfi1); FileData records1 = ef1.getData(); byte[] record1 = records1.getContent(); Assert.assertArrayEquals(ByteArrayUtil.fromHex(RECORD_CONTENT1), record1); ElementaryFile ef2 = calypsoPo.getFileBySfi(sfi2); FileData records2 = ef2.getData(); byte[] record2 = records2.getContent(); Assert.assertArrayEquals(ByteArrayUtil.fromHex(RECORD_CONTENT2), record2); }