@Test
void shouldBuildResultSummaryWithCounters()
{

    Value stats = parameters(
            "nodes-created", value( 42 ),
            "nodes-deleted", value( 4242 ),
            "relationships-created", value( 24 ),
            "relationships-deleted", value( 24 ),
            "properties-set", null,
            "labels-added", value( 5 ),
            "labels-removed", value( 10 ),
            "indexes-added", null,
            "indexes-removed", value( 0 ),
            "constraints-added", null,
            "constraints-removed", value( 2 )
    );
    Map<String,Value> metadata = singletonMap( "stats", stats );
    ResultSummary summary = extractor.extractSummary( query(), connectionMock(), 42, metadata );
    assertEquals( 42, summary.counters().nodesCreated() );
    assertEquals( 4242, summary.counters().nodesDeleted() );
    assertEquals( 24, summary.counters().relationshipsCreated() );
    assertEquals( 24, summary.counters().relationshipsDeleted() );
    assertEquals( 0, summary.counters().propertiesSet() );
    assertEquals( 5, summary.counters().labelsAdded() );
    assertEquals( 10, summary.counters().labelsRemoved() );
    assertEquals( 0, summary.counters().indexesAdded() );
    assertEquals( 0, summary.counters().indexesRemoved() );
    assertEquals( 0, summary.counters().constraintsAdded() );
    assertEquals( 2, summary.counters().constraintsRemoved() );
}