test_class.file: code/src/test/java/com/googlecode/cqengine/persistence/support/ObjectSetTest.java
test_class.identifier: ObjectSetTest
test_case.body: @Test
      @SuppressWarnings("unchecked")
      public void testFromObjectStore_IteratorRemove() throws Exception {
          ObjectStore<Car> objectStore = mock(ObjectStore.class);
          CloseableIterator<Car> closeableIterator = mock(CloseableIterator.class);
          when(closeableIterator.hasNext()).thenReturn(true);
          when(closeableIterator.next()).thenReturn(CarFactory.createCar(1));
  
          when(objectStore.iterator(Mockito.<QueryOptions>any())).thenReturn(closeableIterator);
  
          ObjectSet<Car> objectSet = ObjectSet.fromObjectStore(objectStore, noQueryOptions());
          CloseableIterator<Car> objectSetIterator = objectSet.iterator();
          Assert.assertTrue(objectSetIterator.hasNext());
          Assert.assertNotNull(objectSetIterator.next());
          objectSetIterator.remove();
          Mockito.verify(closeableIterator, times(1)).remove();
      }
test_case.class_method_signature: ObjectSetTest.testFromObjectStore_IteratorRemove()
test_case.full_signature: @Test @SuppressWarnings("unchecked") public void testFromObjectStore_IteratorRemove()
test_case.identifier: testFromObjectStore_IteratorRemove
test_case.invocations: mock mock thenReturn when hasNext thenReturn when next createCar thenReturn when iterator any fromObjectStore noQueryOptions iterator assertTrue hasNext assertNotNull next remove remove verify times
test_case.modifiers: @Test @SuppressWarnings("unchecked") public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testFromObjectStore_IteratorRemove()
focal_class.file: code/src/main/java/com/googlecode/cqengine/persistence/support/ObjectSet.java
focal_class.identifier: ObjectSet
focal_class.interfaces: implements CloseableIterable<O>, Closeable
focal_class.class_method_signature: ObjectSet.close()
focal_class.full_signature: @Override public abstract void close()
focal_class.identifier: close
focal_class.modifiers: @Override public abstract
focal_class.parameters: ()
focal_class.return: void
focal_class.signature: void close()
focal_class.class_method_signature: ObjectSet.isEmpty()
focal_class.full_signature: public abstract boolean isEmpty()
focal_class.identifier: isEmpty
focal_class.modifiers: public abstract
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isEmpty()
focal_class.class_method_signature: ObjectSet.fromObjectStore(final ObjectStore<O> objectStore, final QueryOptions queryOptions)
focal_class.full_signature: public static ObjectSet<O> fromObjectStore(final ObjectStore<O> objectStore, final QueryOptions queryOptions)
focal_class.identifier: fromObjectStore
focal_class.modifiers: public static
focal_class.parameters: (final ObjectStore<O> objectStore, final QueryOptions queryOptions)
focal_class.return: ObjectSet<O>
focal_class.signature: ObjectSet<O> fromObjectStore(final ObjectStore<O> objectStore, final QueryOptions queryOptions)
focal_class.class_method_signature: ObjectSet.fromCollection(final Collection<O> collection)
focal_class.full_signature: public static ObjectSet<O> fromCollection(final Collection<O> collection)
focal_class.identifier: fromCollection
focal_class.modifiers: public static
focal_class.parameters: (final Collection<O> collection)
focal_class.return: ObjectSet<O>
focal_class.signature: ObjectSet<O> fromCollection(final Collection<O> collection)
focal_method.body: public static <O> ObjectSet<O> fromObjectStore(final ObjectStore<O> objectStore, final QueryOptions queryOptions) {
          return new ObjectStoreAsObjectSet<O>(objectStore, queryOptions);
      }
focal_method.class_method_signature: ObjectSet.fromObjectStore(final ObjectStore<O> objectStore, final QueryOptions queryOptions)
focal_method.full_signature: public static ObjectSet<O> fromObjectStore(final ObjectStore<O> objectStore, final QueryOptions queryOptions)
focal_method.identifier: fromObjectStore
focal_method.modifiers: public static
focal_method.parameters: (final ObjectStore<O> objectStore, final QueryOptions queryOptions)
focal_method.return: ObjectSet<O>
focal_method.signature: ObjectSet<O> fromObjectStore(final ObjectStore<O> objectStore, final QueryOptions queryOptions)