@Override
    public void resumeConsumption() {
        if (initialCredit == 0) {
            // reset available credit if no exclusive buffer is available at the
            // consumer side for all floating buffers must have been released
            numCreditsAvailable = 0;
        }
        subpartitionView.resumeConsumption();
    }
@Test
    void testResumeConsumption() throws Exception {
        int numCredits = 2;
        CreditBasedSequenceNumberingViewReader reader1 =
                createNetworkSequenceViewReader(numCredits);

        reader1.resumeConsumption();
        assertThat(reader1.getNumCreditsAvailable()).isEqualTo(numCredits);

        reader1.addCredit(numCredits);
        reader1.resumeConsumption();
        assertThat(reader1.getNumCreditsAvailable()).isEqualTo(2 * numCredits);

        CreditBasedSequenceNumberingViewReader reader2 = createNetworkSequenceViewReader(0);

        reader2.addCredit(numCredits);
        assertThat(reader2.getNumCreditsAvailable()).isEqualTo(numCredits);

        reader2.resumeConsumption();
        assertThat(reader2.getNumCreditsAvailable()).isZero();
    }