@Test
public void shouldCreateDistinctBufferOffHeap() {

    try (DistinctBuffer<String> buffer = mgr.createDistinctBuffer(Serializer.STRING).useHeap(false).keepSize(true).make()) {
        assertTrue(buffer.addIfAbsent("first"));
        assertTrue(buffer.addIfAbsent("second"));
        assertTrue(buffer.addIfAbsent("third"));
        assertTrue(buffer.addIfAbsent("fourth"));
        assertFalse(buffer.addIfAbsent("first"));
        assertFalse(buffer.addIfAbsent("second"));
        assertFalse(buffer.addIfAbsent("fourth"));
        assertFalse(buffer.addIfAbsent("third"));
        assertThat(buffer.size(), is(4L));
    }
}