class Change implements Serializable {

    public static <C extends Identified<?>> Change<C> update(C oldObject, C newObject) {
        Preconditions.checkArgument(oldObject != null, "Attempted to create an update from a null oldObject");
        Preconditions.checkArgument(newObject != null, "Attempted to create an update to a null newObject");
        Preconditions.checkArgument(newObject.getId().equals(oldObject.getId()), "Attempted to create an update with non-matching ids.");

        return new Change<>(oldObject, newObject);
    }

    private  Change(@Nullable C originalObject, @Nullable C newObject);

}