@Test
public void testAsyncWritesToBuffer() {

    GlobalState.BINARY_QUEUE.clear();
    Buffer buffer = (Buffer) store;
    int count = TestData.getScaleCount();
    for (int i = 0; i < count; ++i) {
        Write write = null;
        while (write == null) {
            write = TestData.getWriteAdd();
        }
        buffer.insert(write, true);
    }
    while (GlobalState.BINARY_QUEUE.size() < count) {
        // wait for all the async placements onto the binary queue to finish
        continue;
    }
    Assert.assertEquals(count, GlobalState.BINARY_QUEUE.size());
    GlobalState.BINARY_QUEUE.clear();
}