    @Test
    public void compilesExecutableJava() throws Exception {

        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
        final Program program = new Program(
            new InputOf(
                new JoinedText(
                    "\n",
                    "object car as Serializable:",
                    "  Integer @vin",
                    "  String name():",
                    "    \"Mercedes-Benz\""
                ).asString()
            ),
            s -> new OutputTo(baos)
        );
        program.compile();
        try (final GroovyClassLoader loader = new GroovyClassLoader()) {
            final Class<?> type = loader.parseClass(
                new GroovyCodeSource(
                    new TextOf(baos.toByteArray()).asString(),
                    "car", GroovyShell.DEFAULT_CODE_BASE
                )
            );
            MatcherAssert.assertThat(
                type.getMethod("name").invoke(
                    type.getConstructor(Integer.class).newInstance(0)
                ),
                Matchers.equalTo("Mercedes-Benz")
            );
        }
    }