### Question:
GraphOperation extends AbstractOperation { @Override TF_Operation getUnsafeNativeHandle(int outputIdx) { return getUnsafeNativeHandle(); } GraphOperation(Graph g, TF_Operation unsafeNativeHandle); @Override String name(); @Override String type(); @Override int numOutputs(); @Override int outputListLength(final String name); @Override int hashCode(); @Override boolean equals(Object o); @Override int inputListLength(final String name);  }### Answer:
@Test public void operationCollection() { try (Graph g = new Graph()) { Ops tf = Ops.create(g); GraphOperation op1 = (GraphOperation)tf.withName("op1").constant(1).op(); GraphOperation op2 = (GraphOperation)tf.withName("op2").constant(2).op(); GraphOperation op3 = new GraphOperation(g, op1.getUnsafeNativeHandle()); GraphOperation op4 = g.operation("op1"); Set<Operation> ops = new HashSet<>(); ops.addAll(Arrays.asList(op1, op2, op3, op4)); assertEquals(2, ops.size()); assertTrue(ops.contains(op1)); assertTrue(ops.contains(op2)); assertTrue(ops.contains(op3)); assertTrue(ops.contains(op4)); } }