code: private void assertState(StandbyIngestState... expectedStates)
        throws IOException {
      for (StandbyIngestState s : expectedStates) {
        if (currentIngestState == s)
          return;
      }
      throw new IOException("Standby: illegal state - current: "
          + currentIngestState);
    }
docs: Assert that the standby is in the expected state
  
  @param expectedStates expected states to be in