  @Test
  void metricsAreCalculatedCorrectly() throws AnalyzerException, IOException {


    byte[] fileContent =
        IOUtils.toByteArray(getClass().getResourceAsStream("/CheckstyleAnalyzer.java.txt"));

    CheckstyleSourceCodeFileAnalyzerPlugin analyzer = new CheckstyleSourceCodeFileAnalyzerPlugin();
    FileMetrics metrics = analyzer.analyzeFile("abc.java", fileContent);

    Assertions.assertEquals(
        Long.valueOf(11L),
        metrics.getMetricCount(
            new Metric(
                "checkstyle:com.puppycrawl.tools.checkstyle.checks.imports.CustomImportOrderCheck")));
  }