Technology•February 26, 2016
Cassandra Unit Testing with Byteman

@Test
@BMRule(name = "Greatest name in the world",
targetClass="HintsBufferPool",
targetMethod="switchCurrentBuffer",
targetLocation="AT INVOKE java.util.concurrent.BlockingQueue.take",
action="org.apache.cassandra.hints.HintsBufferPoolTest.blockedOnBackpressure = true;")
public void testBackpressure() throws Exception
action="org.apache.cassandra.hints.HintsBufferPoolTest.blockedOnBackpressure = true
targetClass="HintsBufferPool",
targetMethod="switchCurrentBuffer",
targetLocation="AT INVOKE java.util.concurrent.BlockingQueue.take",
assertTrue(blockedOnBackpressure);