public boolean produce(T data) {
        if (driver != null) {
            if (!driver.isRunning(channels)) {
                return false;
            }
        }

        return this.channels.save(data);
    }
@Test
    public void testIfPossibleProduce() {
        DataCarrier<SampleData> carrier = new DataCarrier<>(2, 100, BufferStrategy.IF_POSSIBLE);

        for (int i = 0; i < 200; i++) {
            assertTrue(carrier.produce(new SampleData().setName("d" + i)));
        }

        for (int i = 0; i < 200; i++) {
            Assertions.assertFalse(carrier.produce(new SampleData().setName("d" + i + "_2")));
        }

        Channels<SampleData> channels = Whitebox.getInternalState(carrier, "channels");
        QueueBuffer<SampleData> buffer1 = channels.getBuffer(0);
        List<SampleData> result = new ArrayList<>();
        buffer1.obtain(result);

        QueueBuffer<SampleData> buffer2 = channels.getBuffer(1);
        buffer2.obtain(result);
        assertEquals(200, result.size());
    }