ChainProperties implements ByteTransformable { @Override public byte[] toByteArray() throws SteemInvalidTransactionException { try (ByteArrayOutputStream serializedChainProperties = new ByteArrayOutputStream()) { serializedChainProperties.write(this.getAccountCreationFee().toByteArray()); serializedChainProperties.write(SteemJUtils.transformIntToByteArray((int) this.getMaximumBlockSize())); serializedChainProperties.write(SteemJUtils.transformShortToByteArray(this.getSdbInterestRate())); return serializedChainProperties.toByteArray(); } catch (IOException e) { throw new SteemInvalidTransactionException( "A problem occured while transforming the operation into a byte array.", e); } } @JsonCreator  ChainProperties(@JsonProperty("account_creation_fee") LegacyAsset accountCreationFee,
            @JsonProperty("maximum_block_size") long maximumBlockSize,
            @JsonProperty("sbd_interest_rate") int sdbInterestRate); LegacyAsset getAccountCreationFee(); void setAccountCreationFee(LegacyAsset accountCreationFee); long getMaximumBlockSize(); void setMaximumBlockSize(long maximumBlockSize); int getSdbInterestRate(); void setSdbInterestRate(int sdbInterestRate); @Override byte[] toByteArray(); @Override String toString();  }
@Test public void testSteemChainPropertiesToByteArray() throws Exception { LegacyAsset accountCreationFee = new LegacyAsset(5000, LegacyAssetSymbolType.STEEM); long maximumBlockSize = 65536; int sbdInterestRate = 0; ChainProperties chainProperties = new ChainProperties(accountCreationFee, maximumBlockSize, sbdInterestRate); assertThat("Expect that the asset object has the given byte representation.", CryptoUtils.HEX.encode(chainProperties.toByteArray()), equalTo(EXPECTED_BYTE_REPRESENTATION)); }