### Question:
DistributedAtomicLong implements DistributedAtomicNumber<Long> { @Override public void forceSet(Long newValue) throws Exception { value.forceSet(valueToBytes(newValue)); } DistributedAtomicLong(CuratorFramework client, String counterPath, RetryPolicy retryPolicy);  DistributedAtomicLong(CuratorFramework client, String counterPath, RetryPolicy retryPolicy, PromotedToLock promotedToLock); @Override AtomicValue<Long> get(); @Override void forceSet(Long newValue); @Override AtomicValue<Long> compareAndSet(Long expectedValue, Long newValue); @Override AtomicValue<Long> trySet(Long newValue); @Override boolean initialize(Long initialize); @Override AtomicValue<Long> increment(); @Override AtomicValue<Long> decrement(); @Override AtomicValue<Long> add(Long delta); @Override AtomicValue<Long> subtract(Long delta);  }### Answer:
@Test public void testForceSet() throws Exception { CuratorFramework client = CuratorFrameworkFactory.newClient(server.getConnectString(), new RetryOneTime(1)); client.start(); try { final DistributedAtomicLong dal = new DistributedAtomicLong(client, "/counter", new RetryOneTime(1)); ExecutorService executorService = Executors.newFixedThreadPool(2); executorService.submit ( new Callable<Object>() { @Override public Object call() throws Exception { for ( int i = 0; i < 1000; ++i ) { dal.increment(); Thread.sleep(10); } return null; } } ); executorService.submit ( new Callable<Object>() { @Override public Object call() throws Exception { for ( int i = 0; i < 1000; ++i ) { dal.forceSet(0L); Thread.sleep(10); } return null; } } ); Assert.assertTrue(dal.get().preValue() < 10); } finally { client.close(); } }