Code example for Service.State

Methods: toString

0
 
    try { 
      service.start().get(1, TimeUnit.MILLISECONDS);
      fail("Expected timeout");
    } catch (TimeoutException e) {
      assertTrue(e.getMessage().contains(State.STARTING.toString()));
    } 
  } 
 
  private class NullService extends AbstractIdleService {
    boolean startUpCalled = false;
    boolean shutDownCalled = false;
    State expectedShutdownState = State.STOPPING;
 
    @Override protected void startUp() { 
      assertFalse(startUpCalled);
      assertFalse(shutDownCalled);
      startUpCalled = true;
      assertEquals(State.STARTING, state());
    } 
Connect your IDE to all the code out there  Get Codota for Java