/**
  * Test get operations
  *
  * @param Connection $connection
  *   The connection to perform tests on.
  *
  * @dataProvider connectionDataProvider
  */
 public function testGetOperations(Connection $connection)
 {
     $indexer = new Indexer($connection);
     $connection->startTransaction();
     $operation1 = $connection->addMetadata('value', 'value1');
     $operation2 = $connection->addMetadata('value', 'value2');
     $operation3 = $connection->addMetadata('value', 'value3');
     $indexer->index($operation1, 'test1');
     $indexer->index($operation2, 'test1');
     $indexer->index($operation3, 'test3');
     $expected = [$operation1->idx($connection) => $operation1, $operation2->idx($connection) => $operation2, $operation3->idx($connection) => $operation3];
     $check = $indexer->getOperations();
     $this->assertSame($expected, $check, 'Correct operations not found in indexer.');
     $expected = ['test1' => [$operation1->idx($connection) => $operation1, $operation2->idx($connection) => $operation2], 'test3' => [$operation3->idx($connection) => $operation3]];
     $check = $indexer->getIndex();
     $this->assertSame($expected, $check, 'Correct operations not found in indexer.');
 }