@Test
void shouldBuildResultSummaryWithNotifications()
{

    Value notification1 = parameters(
            "description", "Almost bad thing",
            "code", "Neo.DummyNotification",
            "title", "A title",
            "severity", "WARNING",
            "position", parameters(
                    "offset", 42,
                    "line", 4242,
                    "column", 424242
            )
    );
    Value notification2 = parameters(
            "description", "Almost good thing",
            "code", "Neo.GoodNotification",
            "title", "Good",
            "severity", "INFO",
            "position", parameters(
                    "offset", 1,
                    "line", 2,
                    "column", 3
            )
    );
    Value notifications = value( notification1, notification2 );
    Map<String,Value> metadata = singletonMap( "notifications", notifications );
    ResultSummary summary = extractor.extractSummary( query(), connectionMock(), 42, metadata );
    assertEquals( 2, summary.notifications().size() );
    Notification firstNotification = summary.notifications().get( 0 );
    Notification secondNotification = summary.notifications().get( 1 );
    assertEquals( "Almost bad thing", firstNotification.description() );
    assertEquals( "Neo.DummyNotification", firstNotification.code() );
    assertEquals( "A title", firstNotification.title() );
    assertEquals( "WARNING", firstNotification.severity() );
    assertEquals( new InternalInputPosition( 42, 4242, 424242 ), firstNotification.position() );
    assertEquals( "Almost good thing", secondNotification.description() );
    assertEquals( "Neo.GoodNotification", secondNotification.code() );
    assertEquals( "Good", secondNotification.title() );
    assertEquals( "INFO", secondNotification.severity() );
    assertEquals( new InternalInputPosition( 1, 2, 3 ), secondNotification.position() );
}