### Question:
BatchApiOperation implements ApiOperation, Iterable<ApiOperation> { @Override public List<GenericJson> execute(IndexingService service) throws IOException, InterruptedException { return execute(service, Optional.empty()); } 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 testExecute() throws Exception { List<ApiOperation> list = ImmutableList.of(mockApiOperation); BatchApiOperation batch = new BatchApiOperation(list.iterator()); batch.execute(null); thrown.expect(IllegalStateException.class); batch.iterator(); }