BoltProtocolVersion implements Comparable<BoltProtocolVersion> { public int toInt() { int shiftedMinor = minorVersion << 8; return shiftedMinor | majorVersion; } BoltProtocolVersion( int majorVersion, int minorVersion ); static BoltProtocolVersion fromRawBytes( int rawVersion ); long getMinorVersion(); long getMajorVersion(); int toInt(); @Override String toString(); @Override int hashCode(); @Override boolean equals( Object o ); @Override int compareTo( BoltProtocolVersion other ); static boolean isHttp( BoltProtocolVersion protocolVersion );  }
@Test void shouldOutputCorrectLongFormatForMajorVersionOnly() { BoltProtocolVersion version = new BoltProtocolVersion( 4, 0 ); assertEquals( 4L, version.toInt() ); }
@Test void shouldOutputCorrectLongFormatForMajorAndMinorVersion() { BoltProtocolVersion version = new BoltProtocolVersion( 4, 1 ); assertEquals( 260L, version.toInt() ); }