test_class.file: code/src/test/java/com/googlecode/cqengine/metadata/MetadataEngineTest.java
test_class.identifier: MetadataEngineTest
test_case.body: @Test
      public void testAttemptToAccessMetadataWithoutSortedIndex() {
          IndexedCollection<Car> cars = createIndexedCollectionOfCars(5);
          @SuppressWarnings("unchecked") Attribute<Car, Integer> ATTRIBUTE = Mockito.mock(SimpleAttribute.class);
          Mockito.when(ATTRIBUTE.toString()).thenReturn("ATTRIBUTE");
          IllegalStateException expected = null;
          try {
              cars.getMetadataEngine().getSortedAttributeMetadata(ATTRIBUTE);
          }
          catch (IllegalStateException e) {
              expected = e;
          }
          assertNotNull(expected);
          assertEquals("A SortedKeyStatisticsAttributeIndex has not been added to the collection, and must be added first, to enable metadata to be examined for attribute: ATTRIBUTE", expected.getMessage());
      }
test_case.class_method_signature: MetadataEngineTest.testAttemptToAccessMetadataWithoutSortedIndex()
test_case.full_signature: @Test public void testAttemptToAccessMetadataWithoutSortedIndex()
test_case.identifier: testAttemptToAccessMetadataWithoutSortedIndex
test_case.invocations: createIndexedCollectionOfCars mock thenReturn when toString getSortedAttributeMetadata getMetadataEngine assertNotNull assertEquals getMessage
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testAttemptToAccessMetadataWithoutSortedIndex()
focal_class.declarator: indexedCollection
focal_class.modifier: private final
focal_class.original_string: private final IndexedCollection<O> indexedCollection;
focal_class.type: IndexedCollection<O>
focal_class.var_name: indexedCollection
focal_class.declarator: openResourcesHandler
focal_class.modifier: private final
focal_class.original_string: private final Supplier<QueryOptions> openResourcesHandler;
focal_class.type: Supplier<QueryOptions>
focal_class.var_name: openResourcesHandler
focal_class.declarator: closeResourcesHandler
focal_class.modifier: private final
focal_class.original_string: private final Consumer<QueryOptions> closeResourcesHandler;
focal_class.type: Consumer<QueryOptions>
focal_class.var_name: closeResourcesHandler
focal_class.file: code/src/main/java/com/googlecode/cqengine/metadata/MetadataEngine.java
focal_class.identifier: MetadataEngine
focal_class.class_method_signature: MetadataEngine.MetadataEngine(IndexedCollection<O> indexedCollection, Supplier<QueryOptions> openResourcesHandler, Consumer<QueryOptions> closeResourcesHandler)
focal_class.full_signature: public  MetadataEngine(IndexedCollection<O> indexedCollection, Supplier<QueryOptions> openResourcesHandler, Consumer<QueryOptions> closeResourcesHandler)
focal_class.identifier: MetadataEngine
focal_class.modifiers: public
focal_class.parameters: (IndexedCollection<O> indexedCollection, Supplier<QueryOptions> openResourcesHandler, Consumer<QueryOptions> closeResourcesHandler)
focal_class.signature:  MetadataEngine(IndexedCollection<O> indexedCollection, Supplier<QueryOptions> openResourcesHandler, Consumer<QueryOptions> closeResourcesHandler)
focal_class.class_method_signature: MetadataEngine.getAttributeMetadata(Attribute<O, A> attribute)
focal_class.full_signature: public AttributeMetadata<A, O> getAttributeMetadata(Attribute<O, A> attribute)
focal_class.identifier: getAttributeMetadata
focal_class.modifiers: public
focal_class.parameters: (Attribute<O, A> attribute)
focal_class.return: AttributeMetadata<A, O>
focal_class.signature: AttributeMetadata<A, O> getAttributeMetadata(Attribute<O, A> attribute)
focal_class.class_method_signature: MetadataEngine.getSortedAttributeMetadata(Attribute<O, A> attribute)
focal_class.full_signature: public SortedAttributeMetadata<A, O> getSortedAttributeMetadata(Attribute<O, A> attribute)
focal_class.identifier: getSortedAttributeMetadata
focal_class.modifiers: public
focal_class.parameters: (Attribute<O, A> attribute)
focal_class.return: SortedAttributeMetadata<A, O>
focal_class.signature: SortedAttributeMetadata<A, O> getSortedAttributeMetadata(Attribute<O, A> attribute)
focal_class.class_method_signature: MetadataEngine.getIndexOnAttribute(Class<I> indexType, Attribute<O, A> attribute)
focal_class.full_signature: private I getIndexOnAttribute(Class<I> indexType, Attribute<O, A> attribute)
focal_class.identifier: getIndexOnAttribute
focal_class.modifiers: private
focal_class.parameters: (Class<I> indexType, Attribute<O, A> attribute)
focal_class.return: I
focal_class.signature: I getIndexOnAttribute(Class<I> indexType, Attribute<O, A> attribute)
focal_method.body: public <A extends Comparable<A>> SortedAttributeMetadata<A, O> getSortedAttributeMetadata(Attribute<O, A> attribute) {
          @SuppressWarnings("unchecked")
          SortedKeyStatisticsIndex<A, O> index = getIndexOnAttribute(SortedKeyStatisticsAttributeIndex.class, attribute);
          return new SortedAttributeMetadata<>(index, openResourcesHandler, closeResourcesHandler);
      }
focal_method.class_method_signature: MetadataEngine.getSortedAttributeMetadata(Attribute<O, A> attribute)
focal_method.full_signature: public SortedAttributeMetadata<A, O> getSortedAttributeMetadata(Attribute<O, A> attribute)
focal_method.identifier: getSortedAttributeMetadata
focal_method.invocations: getIndexOnAttribute
focal_method.modifiers: public
focal_method.parameters: (Attribute<O, A> attribute)
focal_method.return: SortedAttributeMetadata<A, O>
focal_method.signature: SortedAttributeMetadata<A, O> getSortedAttributeMetadata(Attribute<O, A> attribute)