@VisibleForTesting
  public void generateStateDiagram(Path outputFile) throws IOException {
    try (OutputStream outFile = Files.newOutputStream(outputFile,
        StandardOpenOption.CREATE, StandardOpenOption.WRITE)) {
      mStateMachine.configuration().generateDotFileInto(outFile, /* printLabels */ true);
    }
  }
@Test
  public void testGenerateStateDiagram() throws IOException  {
    EmbeddedChannel embeddedChannel = new EmbeddedChannel();
    NettyReadHandlerStateMachine<ReadRequest> stateMachine =
        new NettyReadHandlerStateMachine<>(
            embeddedChannel, ReadRequest.class, (readRequest) -> null);
    stateMachine.generateStateDiagram(new File("output.dot").toPath());
  }