### Question:
RelationshipsBatchBuffer extends RecordsBatchBuffer<RelationshipReference> { public void add(long sourceId, long targetId, long relationshipReference) { int position = this.length; long[] buffer = this.buffer; buffer[position] = sourceId; buffer[1 + position] = targetId; buffer[2 + position] = relationshipReference; this.length = 4 + position; } RelationshipsBatchBuffer(
        final IdMapping idMap,
        final int type,
        int capacity
    );  RelationshipsBatchBuffer(
        final IdMapping idMap,
        final int type,
        int capacity,
        boolean throwOnUnMappedNodeIds
    ); @Override void offer(final RelationshipReference record); void add(long sourceId, long targetId, long relationshipReference); void add(long sourceId, long targetId, long relationshipReference, long propertyReference); long[] sortBySource(); long[] sortByTarget(); long[] spareLongs(); int[] spareInts(); static final int RELATIONSHIP_REFERENCE_OFFSET; static final int PROPERTIES_REFERENCE_OFFSET; static final int BATCH_ENTRY_SIZE; static final int BATCH_ENTRY_SHIFT_SIZE; }### Answer:
@Test void flushBufferWhenFull() { RelationshipsBatchBuffer buffer = new RelationshipsBatchBuffer(null, -1, 1); buffer.add(0, 1, -1, -1); assertTrue(buffer.isFull()); }