Source:
public void shouldSeeNewRelationshipPropertyInTransaction() throws Exception { try ( Transaction tx = session.beginTransaction() ) { String propKey1 = "prop1"; String propKey2 = "prop2"; long n1 = tx.dataWrite().nodeCreate(); long n2 = tx.dataWrite().nodeCreate(); int label = tx.tokenWrite().relationshipTypeGetOrCreateForName( "R" ); long r = tx.dataWrite().relationshipCreate( n1, label, n2 ); int prop1 = session.token().propertyKeyGetOrCreateForName( propKey1 ); int prop2 = session.token().propertyKeyGetOrCreateForName( propKey2 ); assertEquals( tx.dataWrite().relationshipSetProperty( r, prop1, stringValue( "hello" ) ), NO_VALUE ); assertEquals( tx.dataWrite().relationshipSetProperty( r, prop2, stringValue( "world" ) ), NO_VALUE ); try ( NodeCursor node = cursors.allocateNodeCursor(); RelationshipTraversalCursor relationship = cursors.allocateRelationshipTraversalCursor(); PropertyCursor property = cursors.allocatePropertyCursor() ) { tx.dataRead().singleNode( n1, node ); assertTrue( "should access node", node.next() ); node.allRelationships( relationship ); assertTrue( "should access relationship", relationship.next() ); relationship.properties( property ); assertTrue( property.next() ); assertEquals( prop1, property.propertyKey() ); assertEquals( property.propertyValue(), stringValue( "hello" ) ); assertTrue( property.next() ); assertEquals( prop2, property.propertyKey() ); assertEquals( property.propertyValue(), stringValue( "world" ) ); assertFalse( "should only find two properties", property.next() ); assertFalse( "should only find one relationship", relationship.next() ); } tx.success(); } }

Target:
public void shouldSeeNewRelationshipPropertyInTransaction() throws Exception { try ( Transaction tx = session.beginTransaction() ) { String propKey1 = "prop1"; String propKey2 = "prop2"; long n1 = tx.dataWrite().nodeCreate(); long n2 = tx.dataWrite().nodeCreate(); int label = tx.tokenWrite().relationshipTypeGetOrCreateForName( "R" ); long r = tx.dataWrite().relationshipCreate( n1, label, n2 ); int prop1 = session.token().propertyKeyGetOrCreateForName( propKey1 ); int prop2 = session.token().propertyKeyGetOrCreateForName( propKey2 ); assertEquals( tx.dataWrite().relationshipSetProperty( r, prop1, stringValue( "hello" ) ), NO_VALUE ); assertEquals( tx.dataWrite().relationshipSetProperty( r, prop2, stringValue( "world" ) ), NO_VALUE ); try ( NodeCursor node = cursors.allocateNodeCursor(); RelationshipTraversalCursor relationship = cursors.allocateRelationshipTraversalCursor(); PropertyCursor property = cursors.allocatePropertyCursor() ) { tx.dataRead().singleNode( n1, node ); assertTrue( "should access node", node.next() ); node.allRelationships( relationship ); assertTrue( "should access relationship", relationship.next() ); relationship.properties( property ); while ( property.next() ) { if ( property.propertyKey() == prop1 ) { assertEquals( property.propertyValue(), stringValue( "hello" ) ); } else if ( property.propertyKey() == prop2 ) { assertEquals( property.propertyValue(), stringValue( "world" ) ); } else { fail( property.propertyKey() + " was not the property key you were looking for" ); } } assertFalse( "should only find one relationship", relationship.next() ); } tx.success(); } }