Map<Object, Object> map =
(Map<Object, Object>) executeMethod.execute(DriverCommand.GET_LOCATION, null);
double latitude = Long.valueOf((Long) map.get("latitude")).doubleValue();
double longitude = Long.valueOf((Long) map.get("longitude")).doubleValue();
double altitude = Long.valueOf((Long) map.get("altitude")).doubleValue();
return new Location(latitude, longitude, altitude);
} else if ("setLocation".equals(method.getName())) {
return executeMethod.execute(DriverCommand.SET_LOCATION, ImmutableMap.of("location", args[0]));
}
return null;
}