test/src/kbasesearchengine/test/search/SearchTypesTest.java
@Test
    public void searchTypes_TypesExactlyAggregationSize() throws Exception {
        int itemCount = 15;
        int aggregationSize = 15;

        IndexingStorage indexStorage = createIndexingStorage(aggregationSize);

        ImmutableMap.Builder<String, Integer> expectedBuilder = ImmutableMap.<String, Integer>builder();
        for (int i = 0; i < itemCount; i += 1) {
                indexOne(indexStorage, new Integer(i), true);
                expectedBuilder.put("SearchType" + i, 1);
        }
        ImmutableMap<String, Integer> expected =  expectedBuilder.build();

        final Map<String, Integer> typeCounts = indexStorage.searchTypes(
                MatchFilter.getBuilder()
                        .withNullableFullTextInAll(null)
                        .withExcludeSubObjects(true)
                        .build(),
                AccessFilter.create()
                        .withPublic(true));
        
        assertThat("incorrect type count", typeCounts.size(), is(itemCount));                
        assertThat("incorrect type count", typeCounts, is(expected));
    }
/*
        searchTypes_TypesExactlyAggregationSize() tests a query over N types with an
        aggregation size of N. This should exactly the same number of
        types (15) returned as may possibly be returned (15).
    */
searchTypes_TypesExactlyAggregationSize() tests a query over N types with an
aggregation size of N. This should exactly the same number of
types (15) returned as may possibly be returned (15).
searchTypes_TypesExactlyAggregationSize () tests a query over N types with an aggregation size of N . This should exactly the same number of types ( 15 ) returned as may possibly be returned ( 15 ) .
@Test
    public void searchTypes_TypesExactlyAggregationSize() throws Exception {
        int itemCount = 15;
        int aggregationSize = 15;
        IndexingStorage indexStorage = createIndexingStorage(aggregationSize);
        ImmutableMap.Builder<String, Integer> expectedBuilder = ImmutableMap.<String, Integer>builder();
        for (int i = 0; i < itemCount; i += 1) {
                indexOne(indexStorage, new Integer(i), true);
                expectedBuilder.put("SearchType" + i, 1);
        }
        ImmutableMap<String, Integer> expected =  expectedBuilder.build();
        final Map<String, Integer> typeCounts = indexStorage.searchTypes(
                MatchFilter.getBuilder()
                        .withNullableFullTextInAll(null)
                        .withExcludeSubObjects(true)
                        .build(),
                AccessFilter.create()
                        .withPublic(true));
        assertThat("incorrect type count", typeCounts.size(), is(itemCount));                
        assertThat("incorrect type count", typeCounts, is(expected));
    }
@ Test public void searchTypes_TypesExactlyAggregationSize ( ) throws Exception { int itemCount = 15 ; int aggregationSize = 15 ; IndexingStorage indexStorage = createIndexingStorage ( aggregationSize ) ; ImmutableMap . Builder < String , Integer > expectedBuilder = ImmutableMap . < String , Integer > builder ( ) ; for ( int i = 0 ; i < itemCount ; i += 1 ) { indexOne ( indexStorage , new Integer ( i ) , true ) ; expectedBuilder . put ( "SearchType" + i , 1 ) ; } ImmutableMap < String , Integer > expected = expectedBuilder . build ( ) ; final Map < String , Integer > typeCounts = indexStorage . searchTypes ( MatchFilter . getBuilder ( ) . withNullableFullTextInAll ( null ) . withExcludeSubObjects ( true ) . build ( ) , AccessFilter . create ( ) . withPublic ( true ) ) ; assertThat ( "incorrect type count" , typeCounts . size ( ) , is ( itemCount ) ) ; assertThat ( "incorrect type count" , typeCounts , is ( expected ) ) ; }
searchTypes_TypesExactlyAggregationSize() tests a query over N types with an
aggregation size of N. This should exactly the same number of
types (15) returned as may possibly be returned (15).
searchTypes_TypesExactlyAggregationSize () tests a query over N types with an aggregation size of N . This should exactly the same number of types ( 15 ) returned as may possibly be returned ( 15 ) .