@Test
  public void testSelect() {

    final Event event = action.execute(src);

    Assert.assertEquals(c14nCtx.getAttemptedFlow(), c14nCtx.getPotentialFlows().get(event.getId()));
    Assert.assertEquals(c14nCtx.getAttemptedFlow().getId(), "test1");
  }
  @Test
  public void testIntermediate() {
    c14nCtx.getIntermediateFlows().put("test1", c14nCtx.getPotentialFlows().get("test1"));

    final Event event = action.execute(src);

    Assert.assertEquals(c14nCtx.getAttemptedFlow(), c14nCtx.getPotentialFlows().get(event.getId()));
    Assert.assertEquals(c14nCtx.getAttemptedFlow().getId(), "test2");
  }
  @Test
  public void testPredicate() {
    c14nCtx
        .getPotentialFlows()
        .get("test1")
        .setActivationCondition(Predicates.<ProfileRequestContext>alwaysFalse());

    final Event event = action.execute(src);

    Assert.assertEquals(c14nCtx.getAttemptedFlow(), c14nCtx.getPotentialFlows().get(event.getId()));
    Assert.assertEquals(c14nCtx.getAttemptedFlow().getId(), "test2");
  }
  /** {@inheritDoc} */
  @Override
  protected void doExecute(
      @Nonnull final ProfileRequestContext profileRequestContext,
      @Nonnull final SubjectCanonicalizationContext c14nContext) {

    log.debug(
        "{} Installing {} canonicalization flows into SubjectCanonicalizationContext",
        getLogPrefix(),
        availableFlows.size());
    for (final SubjectCanonicalizationFlowDescriptor desc : availableFlows) {
      c14nContext.getPotentialFlows().put(desc.getId(), desc);
    }
  }