protected static void EachSuperSourceBox(AtemMockServerWrapper helper, Action <AtemState, SuperSourceState.BoxState, IBMDSwitcherSuperSourceBox, SuperSourceId, SuperSourceBoxId, int> fcn, int iterations = 5)
        {
            var allBoxes = new List <Tuple <SuperSourceId, SuperSourceBoxId, IBMDSwitcherSuperSourceBox> >();

            foreach (KeyValuePair <VideoSource, IBMDSwitcherInputSuperSource> ssrc in helper.GetSdkInputsOfType <IBMDSwitcherInputSuperSource>())
            {
                SuperSourceId id       = (SuperSourceId)(ssrc.Key - VideoSource.SuperSource);
                var           iterator = AtemSDKConverter.CastSdk <IBMDSwitcherSuperSourceBoxIterator>(ssrc.Value.CreateIterator);
                AtemSDKConverter.Iterate <IBMDSwitcherSuperSourceBox>(iterator.Next, (box, i) =>
                {
                    allBoxes.Add(Tuple.Create(id, (SuperSourceBoxId)i, box));
                });
            }

            var boxes = Randomiser.SelectionOfGroup(allBoxes);

            foreach (Tuple <SuperSourceId, SuperSourceBoxId, IBMDSwitcherSuperSourceBox> box in boxes)
            {
                AtemState stateBefore = helper.Helper.BuildLibState();

                SuperSourceState.BoxState boxBefore = stateBefore.SuperSources[(int)box.Item1].Boxes[(int)box.Item2];
                Assert.NotNull(boxBefore);

                for (int i = 0; i < iterations; i++)
                {
                    fcn(stateBefore, boxBefore, box.Item3, box.Item1, box.Item2, i);
                }
            }
        }
        protected static void EachSuperSource(AtemMockServerWrapper helper, Action <AtemState, SuperSourceState, IBMDSwitcherInputSuperSource, SuperSourceId, int> fcn, int iterations = 5)
        {
            Dictionary <VideoSource, IBMDSwitcherInputSuperSource> ssrcs = helper.GetSdkInputsOfType <IBMDSwitcherInputSuperSource>();

            foreach (KeyValuePair <VideoSource, IBMDSwitcherInputSuperSource> ssrc in ssrcs)
            {
                AtemState        stateBefore = helper.Helper.BuildLibState();
                SuperSourceId    id          = (SuperSourceId)(ssrc.Key - VideoSource.SuperSource);
                SuperSourceState ssrcBefore  = stateBefore.SuperSources[(int)id];
                Assert.NotNull(ssrcBefore);

                for (int i = 0; i < iterations; i++)
                {
                    fcn(stateBefore, ssrcBefore, ssrc.Value, id, i);
                }
            }
        }