@Override
  public <C extends ConsensusContext> C as(final Class<C> klass) {
    if (klass.isInstance(postMergeContext)) {
      return klass.cast(postMergeContext);
    }
    return klass.cast(preMergeContext);
  }
Instantiates a new Transition context.

@param preMergeContext the pre merge context
@param postMergeContext the post merge context
consensus/merge/src/main/java/org/hyperledger/besu/consensus/merge/TransitionContext.java