if (!result.isSuccessful()) {
// FIXME: is there a better way to report errors?
System.out.println("Invocation failed: " + result.getErrors());
if (!result.isSuccessful()) {
// FIXME: is there a better way to report errors?
System.out.println("Invocation failed: " + result.getErrors());