Version extends BlockHeaderExtensions { @Override @JsonValue public String toString() { StringBuilder versionToStingBuilder = new StringBuilder(); versionToStingBuilder.append(((this.versionNumber >> 24) & 0x000000FF)); versionToStingBuilder.append("."); versionToStingBuilder.append(((this.versionNumber >> 16) & 0x000000FF)); versionToStingBuilder.append("."); versionToStingBuilder.append((this.versionNumber & 0x0000FFFF)); return versionToStingBuilder.toString(); } Version(byte majorVersion, byte hardforkVersion, short releaseVersion); @JsonCreator  Version(String versionAsString); @Override byte[] toByteArray(); @Override @JsonValue String toString();  }
@Test public void versionToStringTest() { Version version = new Version((byte) 0, (byte) 19, (short) 2); assertThat(version.toString(), equalTo("0.19.2")); }
@Test public void versionFromStringToStringTest() { Version version = new Version("0.19.1"); assertThat(version.toString(), equalTo("0.19.1")); }