### Question:
CoreOperatorFactory { public <T> Checkpoint<T> checkpoint(Source<T> in) { if (in == null) { throw new IllegalArgumentException("in must not be null"); } Type type = getPortType(in); return new Checkpoint<>(type, in); }  Empty<T> empty(Class<T> type); Empty<T> empty(Type type); EmptyFragment empty(); void stop(Source<?> in); Confluent<T> confluent(Source<T> a, Source<T> b); Confluent<T> confluent(Source<T> a, Source<T> b, Source<T> c); Confluent<T> confluent(Source<T> a, Source<T> b, Source<T> c, Source<T> d); Confluent<T> confluent(Iterable<? extends Source<T>> inputs); @SafeVarargs final Confluent<T> confluent(Source<T>... inputs); Checkpoint<T> checkpoint(Source<T> in); Project<T> project(Source<?> in, Class<T> targetType); ProjectFragment project(Source<?> in); Extend<T> extend(Source<?> in, Class<T> targetType); ExtendFragment extend(Source<?> in); Restructure<T> restructure(Source<?> in, Class<T> targetType); RestructureFragment restructure(Source<?> in); static final String EMPTY_NAME; static final String STOP_NAME; static final String CONFLUENT_NAME; static final String CHECKPOINT_NAME; static final String PROJECT_NAME; static final String EXTEND_NAME; static final String RESTRUCTURE_NAME; }### Answer:
@Test public void checkpoint() { CoreOperatorFactory f = new CoreOperatorFactory(); Checkpoint<String> cp = f.checkpoint(in); out.add(cp); Graph<String> graph = toGraph(); assertThat( graph.getConnected("in"), connected(CHECKPOINT_NAME)); assertThat( graph.getConnected("in2"), connected()); assertThat( graph.getConnected(CHECKPOINT_NAME), connected("out")); }