title: Multiple prerequisites in partially ordered mock calls in googletest
body: <p>I was reading partially ordered calls for googletest <a href="https://google.github.io/googletest/gmock_cook_book.html#PartialOrder" rel="nofollow noreferrer">here</a> and I understoond how their example works. So we can use:</p>
  <pre><code>using ::testing::Sequence;
  ...
    Sequence s1, s2;
  
    EXPECT_CALL(foo, A())
        .InSequence(s1, s2);
    EXPECT_CALL(bar, B())
        .InSequence(s1);
    EXPECT_CALL(bar, C())
        .InSequence(s2);
    EXPECT_CALL(foo, D())
        .InSequence(s2);
  </code></pre>
  <p>to show the following DAG:</p>
  <pre><code>       +---&gt; B
         |
    A ---|
         |
         +---&gt; C ---&gt; D
  </code></pre>
  <p>But I wondered how we can define multiple <em>prerequisites</em> of a call. For example, how I can add DAG constraints for <code>E</code> node in following DAG?</p>
  <pre><code>       +---&gt; B ----------+
         |                 |
    A ---|                 |---&gt; E
         |                 |
         +---&gt; C ---&gt; D ---+
  </code></pre>
  <p>Will it be something like this?</p>
  <pre><code>using ::testing::Sequence;
  ...
    Sequence s1, s2, s3;
  
    EXPECT_CALL(foo, A())
        .InSequence(s1, s2);
    EXPECT_CALL(bar, B())
        .InSequence(s1, s3);
    EXPECT_CALL(bar, C())
        .InSequence(s2);
    EXPECT_CALL(foo, D())
        .InSequence(s2, s3);
    EXPECT_CALL(foo, E())
        .InSequence(s3);
  </code></pre>