long start = System.nanoTime();
long len = getContent(id, f2);
System.out.println(
- MessageFormat.format("dowloaded 10 MiB random data in {0}ms",
+ MessageFormat.format("downloaded 10 MiB random data in {0}ms",
(System.nanoTime() - start) / 1e6));
assertEquals(expectedLen, len);
FileUtils.delete(f.toFile(), FileUtils.RETRY);
@SuppressWarnings("boxing")
private String formatErrorMessage(int status, String message) {
- return String.format("Status: %d {\n \"message\": \"%s\"\n}", status,
+ return String.format("Status: %d {\"message\":\"%s\"}", status,
message);
}
}
}
private static Gson createGson() {
- GsonBuilder gb = new GsonBuilder()
- .setFieldNamingPolicy(
- FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
- .setPrettyPrinting().disableHtmlEscaping();
- return gb.create();
+ return new GsonBuilder()
+ .setFieldNamingPolicy(FieldNamingPolicy.LOWER_CASE_WITH_UNDERSCORES)
+ .disableHtmlEscaping()
+ .create();
}
}