private static boolean equals(TemplateResource r1, TemplateResource r2) {
        return Objects.equals(r1.getTemplate(), r2.getTemplate()) && Objects.equals(r1.getFileName(), r2.getFileName());
      }
private static boolean equals(TemplateResource r1, TemplateResource r2)