### Question:
Loop { public static <V extends Vertex<?, ?>> LoopBuilder withInitialConditions(V first, V... others) { Map<VertexLabel, Vertex<?, ?>> map = buildMapForBaseCase(first, others); return withInitialConditions(SimpleVertexDictionary.backedBy(map)); } Loop(Sequence sequence, boolean throwWhenMaxCountIsReached); Sequence getSequence(); static LoopBuilder withInitialConditions(V first, V... others); static LoopBuilder withInitialConditions(VertexDictionary initialState); V getOutput(); static final VertexLabel VALUE_OUT_LABEL; static final VertexLabel CONDITION_LABEL; static final VertexLabel VALUE_IN_LABEL; static final VertexLabel STILL_LOOPING_LABEL; static final int DEFAULT_MAX_COUNT; }### Answer:
@Test public void itThrowsIfYouPassInMultipleOutputVertices() { expectedException.expect(LoopConstructionException.class); expectedException.expectMessage("Duplicate label found in base case"); Loop.withInitialConditions(ConstantVertex.of(0.).setLabel(Loop.VALUE_OUT_LABEL), ConstantVertex.of(1.).setLabel(Loop.VALUE_OUT_LABEL)) .iterateWhile(alwaysTrue) .apply(increment); }