    public void test() throws Exception {
        WebClient webClient = new WebClient();
        webClient.setThrowExceptionOnFailingStatusCode(false);
        for (int i = 0; i < 100; i++) {
            // first, send out a hundred of poisoning requests
            // each of these should leave a thread in a broken state
            sendRequest(webClient, i, true);
        }
        for (int i = 0; i < 100; i++) {
            // now send out normal requests to see if they are affected by the thread's broken state
            String result = sendRequest(webClient, i, false);
            Assert.assertFalse("Invalid state detected after " + (i + 1) + " requests", result.startsWith("bar"));
        }
    }
The program contains a code sequence that can run concurrently with other code, and the code sequence requires temporary, exclusive access to a shared resource, but a timing window exists in which the shared resource can be modified by another code sequence that is operating concurrently.