private T getTypedResult(Result<T> result, Class<T> type) throws FrameworkException {
GraphObject obj = result.get(0);
if (!type.isAssignableFrom(obj.getClass())) {
throw new FrameworkException(type.getSimpleName(), new TypeToken(AbstractNode.base, type.getSimpleName()));
}
return result.get(0);
}