Source:
<code>public void testInvokingWithAPIGoldTierApplicationGold() throws Exception { applicationNameGold = APPLICATION_NAME + TIER_GOLD; apiStoreClientUser1.updateApplication(applicationNameSilver, applicationNameGold, "", "", TIER_GOLD); <START> Thread.sleep(THROTTLING_UNIT_TIME + THROTTLING_ADDITIONAL_WAIT_TIME); <END> long startTime = System.currentTimeMillis(); long currentTime; for (int invocationCount = 1; invocationCount <= GOLD_INVOCATION_LIMIT_PER_MIN; invocationCount++) { currentTime = System.currentTimeMillis(); HttpResponse invokeResponse = HttpRequestUtil.doGet(API_BASE_URL + API_CONTEXT + "/" + API_VERSION_1_0_0 + API_END_POINT_METHOD, requestHeaders); assertEquals(invokeResponse.getResponseCode(), HTTP_RESPONSE_CODE_OK, "Response code mismatched. Invocation attempt:" + invocationCount + " failed during :" + (currentTime - startTime) + " milliseconds under Gold API and Gold Application level tier"); assertTrue(invokeResponse.getData().contains(API_RESPONSE_DATA), "Response data mismatched. Invocation attempt:" + invocationCount + " failed during :" + (currentTime - startTime) + " milliseconds under Gold API and Gold Application level tier"); } currentTime = System.currentTimeMillis(); HttpResponse invokeResponse = HttpRequestUtil.doGet(API_BASE_URL + API_CONTEXT + "/" + API_VERSION_1_0_0 + API_END_POINT_METHOD, requestHeaders); assertEquals(invokeResponse.getResponseCode(), HTTP_RESPONSE_CODE_SERVICE_UNAVAILABLE, "Response code mismatched." + " Invocation attempt:" + (GOLD_INVOCATION_LIMIT_PER_MIN + 1) + " passed during :" + (currentTime - startTime) + " milliseconds under Gold API level tier and Gold Application level tier"); assertTrue(invokeResponse.getData().contains(MESSAGE_THROTTLED_OUT), "Response data mismatched. Invocation attempt:" + (GOLD_INVOCATION_LIMIT_PER_MIN + 1) + " passed during :" + (currentTime - startTime) + " milliseconds under Gold API level tier " + "and Gold Application level tier"); }</code><technical_language>please explain whey this thread sleep is required</technical_language>

Target:
public void testInvokingWithAPIGoldTierApplicationGold() throws APIManagerIntegrationTestException, InterruptedException, IOException { applicationNameGold = APPLICATION_NAME + TIER_GOLD; apiStoreClientUser1.updateApplication(applicationNameSilver, applicationNameGold, "", "", TIER_GOLD); Thread.sleep(THROTTLING_UNIT_TIME + THROTTLING_ADDITIONAL_WAIT_TIME); long startTime = System.currentTimeMillis(); long currentTime; for (int invocationCount = 1; invocationCount <= GOLD_INVOCATION_LIMIT_PER_MIN; invocationCount++) { currentTime = System.currentTimeMillis(); HttpResponse invokeResponse = HttpRequestUtil.doGet(GATEWAY_WEB_APP_URL + API_CONTEXT + "/" + API_VERSION_1_0_0 + API_END_POINT_METHOD, requestHeaders); assertEquals(invokeResponse.getResponseCode(), HTTP_RESPONSE_CODE_OK, "Response code mismatched. Invocation attempt:" + invocationCount + " failed during :" + (currentTime - startTime) + " milliseconds under Gold API and Gold Application level tier"); assertTrue(invokeResponse.getData().contains(API_RESPONSE_DATA), "Response data mismatched. Invocation attempt:" + invocationCount + " failed during :" + (currentTime - startTime) + " milliseconds under Gold API and Gold Application level tier"); } currentTime = System.currentTimeMillis(); HttpResponse invokeResponse = HttpRequestUtil.doGet(GATEWAY_WEB_APP_URL + API_CONTEXT + "/" + API_VERSION_1_0_0 + API_END_POINT_METHOD, requestHeaders); assertEquals(invokeResponse.getResponseCode(), HTTP_RESPONSE_CODE_SERVICE_UNAVAILABLE, "Response code mismatched." + " Invocation attempt:" + (GOLD_INVOCATION_LIMIT_PER_MIN + 1) + " passed during :" + (currentTime - startTime) + " milliseconds under Gold API level tier and Gold Application level tier"); assertTrue(invokeResponse.getData().contains(MESSAGE_THROTTLED_OUT), "Response data mismatched. Invocation attempt:" + (GOLD_INVOCATION_LIMIT_PER_MIN + 1) + " passed during :" + (currentTime - startTime) + " milliseconds under Gold API level tier " + "and Gold Application level tier"); }