@Test
    public void testEntriesWithPrefix() {
        Map<String, Object> props = new HashMap<>();
        props.put("foo.bar", "abc");
        props.put("setting", "def");

        // With stripping
        Map<String, Object> expected = Collections.singletonMap("bar", "abc");
        Map<String, Object> actual = Utils.entriesWithPrefix(props, "foo.");
        assertEquals(expected, actual);

        // Without stripping
        expected = Collections.singletonMap("foo.bar", "abc");
        actual = Utils.entriesWithPrefix(props, "foo.", false);
        assertEquals(expected, actual);
    }
Expectation setter for multiple reads where each one reads random bytes to the buffer.

@param channelMock           The mocked FileChannel object
@param bufferSize            The buffer size
@return Expected buffer string
@throws IOException          If an I/O error occurs
clients/src/test/java/org/apache/kafka/common/utils/UtilsTest.java