@Test
  public void testConcurrentBlockingTake() throws Exception {
    logWriter.info("HARQAddOperationJUnitTest : testConcurrentBlockingTake BEGIN");

    testFailed = false;
    message = null;
    final HARegionQueue rq = createHARegionQueue("testBlockingTake");
    final List takenObjects = new Vector();
    final int totalTakeThreads = 2;
    Thread[] takeThreads = new Thread[totalTakeThreads];
    for (int i = 0; i < totalTakeThreads; i++) {
      takeThreads[i] = new Thread() {
        @Override
        public void run() {
          try {
            takenObjects.add(rq.take());
          } catch (Exception e) {
            testFailed = true;
            message.append("Exception while performing take operation " + e.getStackTrace());
          }
        }
      };
      takeThreads[i].start();
    }

    Conflatable c = null;
    EventID id = null;
    for (int i = 0; i < totalTakeThreads; i++) {
      id = new EventID(new byte[] {1}, 1, i);
      c = new ConflatableObject("k" + i, "v" + i, id, true, "region1");
      rq.put(c);
    }
    for (int i = 0; i < totalTakeThreads; i++) {
      ThreadUtils.join(takeThreads[i], 20 * 1000);
    }

    assertEquals(totalTakeThreads, takenObjects.size());

    for (int i = 0; i < totalTakeThreads; i++) {
      c = (Conflatable) takenObjects.get(i);
      assertNotNull(c);
    }

    if (testFailed) {
      fail("Test failed due to " + message);
    }
    logWriter.info("HARQAddOperationJUnitTest : testConcurrentBlockingTake END");
  }
This test performs the following steps :<br>
1)Create a blocking queue.<br>
2) Start two threads which does take() on it and add the return object to a list.<br>
3)Put two object into the queue. <br>
4)Verify both both take() threads return with an object by ensuring that the size of the list
containing return objects is two.<br>
geode-core/src/integrationTest/java/org/apache/geode/internal/cache/ha/BlockingHARQAddOperationJUnitTest.java