@Override
  public synchronized void startInternal() throws LifecycleException {
    try {
      // direct coupling with LogbackValve implementation
      FieldUtils.writeField(this, "scheduledExecutorService", ExecutorServiceUtil.newScheduledExecutorService(), true);
      FieldUtils.writeField(this, "started", true, true);
      setState(LifecycleState.STARTING);
    } catch (IllegalAccessException e) {
      throw new IllegalStateException(e);
    }
  }
@Test
  public void startInternal() throws Exception {
    ProgrammaticLogbackValve valve = new ProgrammaticLogbackValve();
    valve.setContainer(mock(Container.class));

    valve.start();
    assertThat(valve.isStarted()).isTrue();

    valve.stop();
    assertThat(valve.isStarted()).isFalse();
  }