public void testCASOperationCloning() {
    CASOperation op = ofact.cas(StoreType.set, "someKey", 727582, 8174, 7175,
      testData, storeCallback);

    CASOperation op2 = cloneOne(CASOperation.class, op);
    assertKey(op2);
    assertEquals(727582, op2.getCasValue());
    assertEquals(8174, op2.getFlags());
    assertEquals(7175, op2.getExpiration());
    assertBytes(op2.getData());
    assertStoreCallback(op2);
  }
Get the operation factory used by the tests.
src/test/java/net/spy/memcached/OperationFactoryTestBase.java