### Question:
GroupReferenceEncoding { static long encodeRelationship( long relationshipId ) { return relationshipId | DIRECT | References.FLAG_MARKER; }    }### Answer:
@Test public void encodeRelationship() { ThreadLocalRandom random = ThreadLocalRandom.current(); for ( int i = 0; i < 1000; i++ ) { long reference = random.nextLong( MAX_ID_LIMIT ); assertFalse( GroupReferenceEncoding.isRelationship( reference ) ); assertTrue( GroupReferenceEncoding.isRelationship( GroupReferenceEncoding.encodeRelationship( reference ) ) ); assertTrue( "encoded reference is negative", GroupReferenceEncoding.encodeRelationship( reference ) < 0 ); } }