QuartzPendingJobsReportingTask { static String extractClassName(String input) { String[] parts = input.split("\\."); return parts.length > 0 ? parts[parts.length - 1] : ""; } QuartzPendingJobsReportingTask(@Autowired DataSource dataSource,
                                          @Autowired MeterRegistry meterRegistry); @Scheduled(fixedRateString = "${l10n.management.metrics.quartz.sql-queue-monitoring.execution-rate}") void reportPendingJobs();  }
@Test public void testExtractClassName() { assertThat(extractClassName(".")).isEqualTo(""); assertThat(extractClassName("")).isEqualTo(""); assertThat(extractClassName("-")).isEqualTo("-"); assertThat(extractClassName("ClassName")).isEqualTo("ClassName"); assertThat(extractClassName("org.package.ClassName")).isEqualTo("ClassName"); assertThat(extractClassName(EmptyTestJob.class.getName())).isEqualTo("EmptyTestJob"); assertThat(extractClassName(getClass().getCanonicalName())).isEqualTo("QuartzPendingJobsReportingTaskTest"); assertThat(extractClassName(Test1Job.class.getName())).isEqualTo("QuartzPendingJobsReportingTaskTest$Test1Job"); }