@Test
public void findFreeFrameReturnsCorrectBufferIndex_whenHasInputBuffer() {

    AudioEncoder encoder = create.audioEncoder().withDequeueInputBufferIndex(0, 1).construct();
    encoder.start();
    Frame frame;
    encoder.fillCommandQueues();
    encoder.fillCommandQueues();
    frame = encoder.findFreeFrame();
    assertEquals(0, frame.getBufferIndex());
    frame = encoder.findFreeFrame();
    assertEquals(1, frame.getBufferIndex());
}