JSONObject status = new ServerStatusNHandler.StatusGenerator(driver).generate();
JSONArray caps = status.getJSONArray(ServerStatusNHandler.SUPPORTED_APPS);
JsonToBeanConverter convertor = new JsonToBeanConverter();
for (int i = 0; i < caps.length(); i++) {
Capabilities c = convertor.convert(Capabilities.class, caps.get(i).toString());
DesiredCapabilities c2 = new DesiredCapabilities(c);
registrationRequest.addDesiredCapability(c2);
}
registrationRequest.getConfiguration()