SvDebitCmdBuild extends AbstractPoCommandBuilder<SvDebitRespPars> { public byte[] getSvDebitData() { byte[] svDebitData = new byte[12]; svDebitData[0] = command.getInstructionByte(); svDebitData[3] = poRevision == PoRevision.REV3_2 ? (byte) 0x19 : (byte) 0x14; System.arraycopy(dataIn, 0, svDebitData, 4, 8); return svDebitData; } SvDebitCmdBuild(
      PoClass poClass, PoRevision poRevision, int amount, byte kvc, byte[] date, byte[] time); void finalizeBuilder(byte[] debitComplementaryData); byte[] getSvDebitData(); @Override SvDebitRespPars createResponseParser(ApduResponse apduResponse); @Override boolean isSessionBufferUsed();  }
@Test public void svDebitCmdBuild_mode_compat_get_debit_data() { SvDebitCmdBuild svDebitCmdBuild = new SvDebitCmdBuild( PoClass.ISO, PoRevision.REV3_1, 1, (byte) 0xAA, ByteArrayUtil.fromHex("1122"), ByteArrayUtil.fromHex("3344")); byte[] svDebitData = svDebitCmdBuild.getSvDebitData(); Assert.assertArrayEquals(ByteArrayUtil.fromHex("BA00001400FFFF11223344AA"), svDebitData); }
@Test public void svDebitCmdBuild_mode_rev3_2_get_debit_data() { SvDebitCmdBuild svDebitCmdBuild = new SvDebitCmdBuild( PoClass.ISO, PoRevision.REV3_2, 1, (byte) 0xAA, ByteArrayUtil.fromHex("1122"), ByteArrayUtil.fromHex("3344")); byte[] svDebitData = svDebitCmdBuild.getSvDebitData(); Assert.assertArrayEquals(ByteArrayUtil.fromHex("BA00001900FFFF11223344AA"), svDebitData); }