public function testCursors()
{
$offset = 3;
$data = ['a', 'b', 'c', 'd', 'e'];
$cursor = ArrayConnection::offsetToCursor($offset);
$this->assertEquals($offset, ArrayConnection::cursorToOffset($cursor));
$this->assertEquals($cursor, ArrayConnection::cursorForObjectInConnection($data, 'd'));
$this->assertNull(null, ArrayConnection::cursorToOffset(null));
$this->assertEquals($offset, ArrayConnection::cursorToOffsetWithDefault($cursor, 2));
$this->assertEquals(2, ArrayConnection::cursorToOffsetWithDefault(null, 2));
}