in src/main/java/org/apache/sling/commons/testing/integration/HttpTestBase.java [589:607]
public boolean isBundleVersionAtLeast(String bundleSymbolicName, String version) throws IOException {
GetMethod method = new GetMethod(HTTP_BASE_URL + "/system/console/bundles/" + bundleSymbolicName + ".json");
int result = httpClient.executeMethod(method);
if ( result != HttpServletResponse.SC_OK) {
return false;
}
try ( JsonReader jsonReader = Json.createReader(method.getResponseBodyAsStream()) ) {
JsonObject bundleInfo = jsonReader.readObject();
String bundleVersion = bundleInfo.getJsonArray("data").getJsonObject(0).getString("version");
Version bundleVer = new Version(bundleVersion);
if ( bundleVer.compareTo(new Version(version)) < 0 ) {
return false;
}
}
return true;
}