### Question:
ObjectVersionGraph extends AbstractVersionGraph<PropertyPath, Object, M, ObjectVersionGraph<M>, Builder<M>> { public static <M> ObjectVersionGraph<M> init() { return new ObjectVersionGraph<M>(); } private  ObjectVersionGraph(); private  ObjectVersionGraph(Builder<M> builder); static ObjectVersionGraph<M> init(); static ObjectVersionGraph<M> init(Version<PropertyPath, Object, M> version); static ObjectVersionGraph<M> init(Version<PropertyPath, Object, M> v1,
                                                 Version<PropertyPath, Object, M> v2, Version<PropertyPath, Object, M>... rest); static ObjectVersionGraph<M> init(Iterable<? extends Version<PropertyPath, Object, M>> versions);  }### Answer:
@Test public void initializers() { ObjectVersionGraph<String> graph = init(v1); assertThat(graph.getTip().getVersion()).isEqualTo(v1); graph = init(Arrays.asList(v1, v2)); assertThat(graph.getTip().getVersion()).isEqualTo(v2); graph = init(v1, v2, v3); assertThat(graph.getTip().getVersion()).isEqualTo(v3); }
@Test public void optimize() { ObjectVersionGraph<String> graph = init(v1, v2); graph = graph.optimize(v2.revision).getGraph(); assertThat(graph.size()).isEqualTo(1); assertThat(graph.getTip().getRevision()).isEqualTo(v2.revision); }