SvLoadLogRecord { public SvLoadLogRecord(byte[] poResponse, int offset) { this.poResponse = poResponse; this.offset = offset; } SvLoadLogRecord(byte[] poResponse, int offset); int getAmount(); int getBalance(); int getLoadTime(); byte[] getLoadTimeBytes(); int getLoadDate(); byte[] getLoadDateBytes(); String getFreeByte(); byte[] getFreeByteBytes(); byte getKvc(); long getSamId(); byte[] getSamIdBytes(); int getSvTNum(); byte[] getSvTNumBytes(); int getSamTNum(); byte[] getSamTNumBytes(); @Override String toString();  }
@Test public void svLoadLogRecord() { byte[] svGetLoadData = ByteArrayUtil.fromHex( HEADER + DATE_STR + FREE1_STR + KVC_STR + FREE2_STR + BALANCE_STR + AMOUNT_STR + TIME_STR + SAMID_STR + SAM_TNUM_STR + SV_TNUM_STR); SvLoadLogRecord svLoadLogRecord = new SvLoadLogRecord(svGetLoadData, HEADER.length() / 2); assertThat(svLoadLogRecord.getAmount()).isEqualTo(AMOUNT); assertThat(svLoadLogRecord.getBalance()).isEqualTo(BALANCE); assertThat(svLoadLogRecord.getLoadDate()).isEqualTo(DATE); assertThat(svLoadLogRecord.getLoadDateBytes()).isEqualTo(DATE_BYTES); assertThat(svLoadLogRecord.getLoadTime()).isEqualTo(TIME); assertThat(svLoadLogRecord.getLoadTimeBytes()).isEqualTo(TIME_BYTES); assertThat(svLoadLogRecord.getLoadTime()).isEqualTo(TIME); assertThat(svLoadLogRecord.getFreeByte()).isEqualTo(FREE); assertThat(svLoadLogRecord.getFreeByteBytes()).isEqualTo(FREE_BYTES); assertThat(svLoadLogRecord.getKvc()).isEqualTo(KVC); assertThat(svLoadLogRecord.getSamId()).isEqualTo(SAMID); assertThat(svLoadLogRecord.getSamIdBytes()).isEqualTo(SAMID_BYTES); assertThat(svLoadLogRecord.getSamTNum()).isEqualTo(SAM_TNUM); assertThat(svLoadLogRecord.getSamTNumBytes()).isEqualTo(SAM_TNUM_BYTES); assertThat(svLoadLogRecord.getSvTNum()).isEqualTo(SV_TNUM); assertThat(svLoadLogRecord.getSvTNumBytes()).isEqualTo(SV_TNUM_BYTES); assertThat(svLoadLogRecord.toString()).contains(SAMID_STR); }