public static void runOnStartup() {
    for (JvmInitializer initializer : ReflectHelpers.loadServicesOrdered(JvmInitializer.class)) {
      // We write to standard out since logging has yet to be initialized.
      System.out.format("Running JvmInitializer#onStartup for %s%n", initializer);
      initializer.onStartup();
      System.out.format("Completed JvmInitializer#onStartup for %s%n", initializer);
    }
  }
@Test
  public void runOnStartup_runsInitializers() {
    JvmInitializers.runOnStartup();

    assertTrue(onStartupRan);
    MatcherAssert.assertThat(
        systemOutRule.getLog(), containsString("Running JvmInitializer#onStartup"));
  }