use of io.nem.symbol.catapult.builders.MosaicExpiryReceiptBuilder in project nem2-sdk-java by nemtech.
the class ArtifactExpiryReceiptTest method shouldMosaicExpiryReceiptBuilderSerialize.
@Test
void shouldMosaicExpiryReceiptBuilderSerialize() {
MosaicId mosaicId = new MosaicId("85BBEA6CC462B244");
MosaicExpiryReceiptBuilder builder = MosaicExpiryReceiptBuilder.create((short) 1, ReceiptTypeDto.INFLATION, new MosaicIdDto(mosaicId.getId().longValue()));
byte[] serialize = builder.serialize();
// NOTE, size must be ignored for some reason!
Assertions.assertEquals(12, serialize.length);
Assertions.assertEquals(16, builder.getSize());
String hex = ConvertUtils.toHex(serialize);
Assertions.assertEquals("0100435144B262C46CEABB85", hex);
}
Aggregations