@Test
    public void failsWhenTypedContextDoesNotMatch() {
        SimpleCodeWriter w = new SimpleCodeWriter();
        w.pushState("a");
        w.putContext("foo", "hello");
        w.write("Hello {");

        ClassCastException e = Assertions.assertThrows(ClassCastException.class, () -> {
            w.getContext("foo", Integer.class);
        });

        assertThat(e.getMessage(),
                equalTo("Expected context value 'foo' to be an instance of java.lang.Integer, but "
                        + "found java.lang.String (Debug Info {path=ROOT/a, near=Hello {\\n})"));
    }
\n     * This is some docs.\n     * And more docs.\n     *\n     * Foo.\n
smithy-utils/src/test/java/software/amazon/smithy/utils/SimpleCodeWriterTest.java