@Test
public void loadsContext() {

    Model model = Model.assembler()
            .addImport(getClass().getResource("context.smithy"))
            .assemble()
            .unwrap();
    Shape shape = model.expectShape(ShapeId.from("example.smithy#Foo"));
    ValidationEvent event = ValidationEvent.builder()
            .id("foo")
            .severity(Severity.ERROR)
            .message("This is the message")
            .shape(shape)
            .build();
    String format = new ContextualValidationEventFormatter().format(event);
    // Normalize line endings for Windows.
    format = format.replace("\r\n", "\n");
    assertThat(format, startsWith("ERROR: example.smithy#Foo (foo)"));
    assertThat(format, containsString("\n     @ "));
    assertThat(format, endsWith(
            "\n     |"
            + "\n   3 | structure Foo {"
            + "\n     | ^"
            + "\n     = This is the message"
            + "\n"));
}