Fix compilation after update to MockWebServer
[android/platform/packages/providers/DownloadProvider.git] / tests / src / com / android / providers / downloads / PublicApiFunctionalTest.java
index bde9581..91304d5 100644 (file)
@@ -59,6 +59,7 @@ import java.io.FileNotFoundException;
 import java.io.IOException;
 import java.io.InputStream;
 import java.util.List;
+import java.util.concurrent.TimeUnit;
 import java.util.concurrent.TimeoutException;
 
 @LargeTest
@@ -241,7 +242,7 @@ public class PublicApiFunctionalTest extends AbstractPublicApiTest {
         return buildResponse(HTTP_OK, STRING_1K)
                .setHeader("Content-length", contentLength)
                .setHeader("Etag", ETAG)
-               .setBytesPerSecond(1024);
+               .throttleBody(1024, 1, TimeUnit.SECONDS);
     }
 
     public void testFiltering() throws Exception {