### Question:
BatchApiOperation implements ApiOperation, Iterable<ApiOperation> { @Override public Iterator<ApiOperation> iterator() { return operations.iterator(); } BatchApiOperation(Iterator<ApiOperation> operations); @Override List<GenericJson> execute(IndexingService service); @Override List<GenericJson> execute(IndexingService service,
      Optional<Consumer<ApiOperation>> operationModifier); @Override Iterator<ApiOperation> iterator(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void testIterator() { List<ApiOperation> list = ImmutableList.of(mockApiOperation); BatchApiOperation batch = new BatchApiOperation(list.iterator()); assertEquals(list, ImmutableList.copyOf(batch.iterator())); thrown.expect(IllegalStateException.class); batch.equals(new BatchApiOperation(list.iterator())); }