code: protected State getNextState() {
          if (getContext().getContextType() == BsonContextType.ARRAY) {
              return State.VALUE;
          } else {
              return State.NAME;
          }
      }
docs: Returns the next valid state for this writer.  For example, transitions from {@link State#VALUE} to {@link State#NAME} once a value
  is written.
  
  @return the next {@code State}