### Question:
EagerOperation extends AbstractOperation { @Override public int outputListLength(final String name) { return outputListLength(opHandle, name); } EagerOperation(
      EagerSession session,
      TFE_Op opNativeHandle,
      TFE_TensorHandle[] outputNativeHandles,
      String type,
      String name); @Override String name(); @Override String type(); @Override int numOutputs(); @Override int outputListLength(final String name); @Override int inputListLength(final String name); @Override TFE_TensorHandle getUnsafeNativeHandle(int outputIndex); @Override Shape shape(int outputIndex); @Override DataType<?> dtype(int outputIndex); @Override Tensor<?> tensor(int outputIndex);  }### Answer:
@Test public void opNotAccessibleIfSessionIsClosed() { EagerSession session = EagerSession.create(); Ops tf = Ops.create(session); EagerOperation add = opBuilder(session, "Add", "SessionClosed") .addInput(tf.constant(2).asOutput()) .addInput(tf.constant(4).asOutput()) .build(); assertEquals(1, add.outputListLength("z")); session.close(); try { add.outputListLength("z"); fail(); } catch (IllegalStateException e) { } }