SvUndebitCmdBuild extends AbstractPoCommandBuilder<SvUndebitRespPars> { public byte[] getSvUndebitData() { byte[] svUndebitData = new byte[12]; svUndebitData[0] = command.getInstructionByte(); svUndebitData[3] = poRevision == PoRevision.REV3_2 ? (byte) 0x19 : (byte) 0x14; System.arraycopy(dataIn, 0, svUndebitData, 4, 8); return svUndebitData; } SvUndebitCmdBuild(
      PoClass poClass, PoRevision poRevision, int amount, byte kvc, byte[] date, byte[] time); void finalizeBuilder(byte[] undebitComplementaryData); byte[] getSvUndebitData(); @Override SvUndebitRespPars createResponseParser(ApduResponse apduResponse); @Override boolean isSessionBufferUsed();  }
@Test public void svUndebitCmdBuild_mode_compat_get_debit_data() { SvUndebitCmdBuild svUndebitCmdBuild = new SvUndebitCmdBuild( PoClass.ISO, PoRevision.REV3_1, 1, (byte) 0xAA, ByteArrayUtil.fromHex("1122"), ByteArrayUtil.fromHex("3344")); byte[] svUndebitData = svUndebitCmdBuild.getSvUndebitData(); Assert.assertArrayEquals(ByteArrayUtil.fromHex("BC00001400000111223344AA"), svUndebitData); }
@Test public void svUndebitCmdBuild_mode_rev3_2_get_debit_data() { SvUndebitCmdBuild svUndebitCmdBuild = new SvUndebitCmdBuild( PoClass.ISO, PoRevision.REV3_2, 1, (byte) 0xAA, ByteArrayUtil.fromHex("1122"), ByteArrayUtil.fromHex("3344")); byte[] svUndebitData = svUndebitCmdBuild.getSvUndebitData(); Assert.assertArrayEquals(ByteArrayUtil.fromHex("BC00001900000111223344AA"), svUndebitData); }