@Test
public void verify_parsing_ExecutionSample() throws IOException {

    JfrEventParser parser = new JfrEventParser();
    CommonEvent event = parser.parseNextEvent(new JsonEventSource() {
        boolean hasNext = true;
        @Override
        public boolean readNext(JsonStreamWriter writer) throws IOException {
            jostart(writer);
                jput(writer, "eventType", "jdk.ExecutionSample");
                jput(writer, "startTime", 1561542999864014126l);
                jostart(writer, "sampledThread");
                    jput(writer, "osThreadId", 20152);
                    jput(writer, "javaName", "main");
                    jput(writer, "javaThreadId", 1);
                    jostart(writer, "group");
                        jput(writer, "parent", null);
                        jput(writer, "name", "main");
                    joend(writer);
                joend(writer);
                jostart(writer, "stackTrace");
                    jput(writer, "truncated", true);
                    jastart(writer, "frames");
                        jframe(writer,
                                "org.eclipse.jdt.internal.ui.javaeditor.breadcrumb.BreadcrumbViewer",
                                "getDropDownShell",
                                239, 42, "JIT compiled"
                        );
                        jframe(writer,
                                "org.eclipse.jdt.internal.ui.javaeditor.breadcrumb.EditorBreadcrumb",
                                "isBreadcrumbEvent",
                                472, 27, "JIT compiled"
                                );
                    jaend(writer);
                joend(writer);
                jput(writer, "state", "STATE_RUNNABLE");
            joend(writer);
            return hasNext | (hasNext = false);
        }
    });
    ThreadSnapshotEvent tevent = (ThreadSnapshotEvent) event;
    Assertions.assertThat(tevent.threadName()).isEqualTo("main");
    Assertions.assertThat(tevent.threadId()).isEqualTo(1l);
    Assertions.assertThat(tevent.threadState()).isEqualTo(State.RUNNABLE);
    Assertions.assertThat(tevent.tags().firstTagFor("jfr.typeId")).isEqualTo("jdk.ExecutionSample");
    Assertions.assertThat(tevent.stackTrace().depth()).isEqualTo(2);
    Assertions.assertThat(tevent.stackTrace().frameAt(0))
        .isEqualTo(new StackFrame("", "org.eclipse.jdt.internal.ui.javaeditor.breadcrumb.BreadcrumbViewer", "getDropDownShell", "java", 239));
    Assertions.assertThat(tevent.stackTrace().frameAt(1))
        .isEqualTo(new StackFrame("", "org.eclipse.jdt.internal.ui.javaeditor.breadcrumb.EditorBreadcrumb", "isBreadcrumbEvent", "java", 472));
}