void (@NotNull List<ResolvedStreamCall.Intermediate> intermediates) { for (int i = 0; i < intermediates.size() - 1; i++) { final ResolvedStreamCall.Intermediate prev = intermediates.get(i); final ResolvedStreamCall.Intermediate next = intermediates.get(i + 1); assertSame(prev.getStateAfter(), next.getStateBefore()); final StreamCall prevCall = prev.getStateAfter().getPrevCall(); assertNotNull(prevCall); assertEquals(prev.getCall().getName(), prevCall.getName()); assertEquals(next.getCall().getName(), next.getStateBefore().getNextCall().getName()); } }